Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

can: m_can: use us_to_ktime() where appropriate

The tx_coalesce_usecs_irq are more suitable for using the
us_to_ktime(). This can make the code more concise and
enhance readability.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: Vincent Mailhol <mailhol@kernel.org>
Link: https://patch.msgid.link/20250825090904.248927-1-zhao.xichao@vivo.com
[mkl: remove not needed line break]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Xichao Zhao and committed by
Marc Kleine-Budde
646cb48d fc006f54

+2 -4
+2 -4
drivers/net/can/m_can/m_can.c
··· 2213 2213 cdev->tx_coalesce_usecs_irq = ec->tx_coalesce_usecs_irq; 2214 2214 2215 2215 if (cdev->rx_coalesce_usecs_irq) 2216 - cdev->irq_timer_wait = 2217 - ns_to_ktime(cdev->rx_coalesce_usecs_irq * NSEC_PER_USEC); 2216 + cdev->irq_timer_wait = us_to_ktime(cdev->rx_coalesce_usecs_irq); 2218 2217 else 2219 - cdev->irq_timer_wait = 2220 - ns_to_ktime(cdev->tx_coalesce_usecs_irq * NSEC_PER_USEC); 2218 + cdev->irq_timer_wait = us_to_ktime(cdev->tx_coalesce_usecs_irq); 2221 2219 2222 2220 return 0; 2223 2221 }