[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250825090904.248927-1-zhao.xichao@vivo.com>
Date: Mon, 25 Aug 2025 17:09:04 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: rcsekar@...sung.com,
mkl@...gutronix.de,
mailhol.vincent@...adoo.fr
Cc: linux-can@...r.kernel.org,
linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] 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@...o.com>
---
drivers/net/can/m_can/m_can.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index fe74dbd2c966..32a57fbcce69 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -2214,10 +2214,10 @@ static int m_can_set_coalesce(struct net_device *dev,
if (cdev->rx_coalesce_usecs_irq)
cdev->irq_timer_wait =
- ns_to_ktime(cdev->rx_coalesce_usecs_irq * NSEC_PER_USEC);
+ us_to_ktime(cdev->rx_coalesce_usecs_irq);
else
cdev->irq_timer_wait =
- ns_to_ktime(cdev->tx_coalesce_usecs_irq * NSEC_PER_USEC);
+ us_to_ktime(cdev->tx_coalesce_usecs_irq);
return 0;
}
--
2.34.1
Powered by blists - more mailing lists