[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240902071841.3519866-1-ruanjinjie@huawei.com>
Date: Mon, 2 Sep 2024 15:18:41 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: <bryan.whitehead@...rochip.com>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<richardcochran@...il.com>, <UNGLinuxDriver@...rochip.com>,
<netdev@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH net-next] net: lan743x: Use NSEC_PER_SEC macro
1000000000L is number of ns per second, use NSEC_PER_SEC macro to replace
it to make it more readable.
Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
---
drivers/net/ethernet/microchip/lan743x_ptp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c
index dcea6652d56d..9c2ec293c163 100644
--- a/drivers/net/ethernet/microchip/lan743x_ptp.c
+++ b/drivers/net/ethernet/microchip/lan743x_ptp.c
@@ -409,7 +409,7 @@ static int lan743x_ptpci_settime64(struct ptp_clock_info *ptpci,
ts->tv_sec);
return -ERANGE;
}
- if (ts->tv_nsec >= 1000000000L ||
+ if (ts->tv_nsec >= NSEC_PER_SEC ||
ts->tv_nsec < 0) {
netif_warn(adapter, drv, adapter->netdev,
"ts->tv_nsec out of range, %ld\n",
--
2.34.1
Powered by blists - more mailing lists