netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ksz884x: use time_before in netdev_open for compatibility
@ 2022-02-20 12:21 wudaemon
  2022-02-22 19:39 ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: wudaemon @ 2022-02-20 12:21 UTC (permalink / raw)
  To: davem, kuba; +Cc: chenhao288, arnd, wudaemon, shenyang39, netdev, linux-kernel

use time_before instead of direct compare for compatibility

Signed-off-by: wudaemon <wudaemon@163.com>
---
 drivers/net/ethernet/micrel/ksz884x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index d024983815da..fd3cb9ce438f 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -5428,7 +5428,7 @@ static int netdev_open(struct net_device *dev)
 		if (rc)
 			return rc;
 		for (i = 0; i < hw->mib_port_cnt; i++) {
-			if (next_jiffies < jiffies)
+			if (time_before(next_jiffies, jiffies))
 				next_jiffies = jiffies + HZ * 2;
 			else
 				next_jiffies += HZ * 1;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-24 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-20 12:21 [PATCH] net: ksz884x: use time_before in netdev_open for compatibility wudaemon
2022-02-22 19:39 ` Jakub Kicinski
     [not found]   ` <1294b33.81f7.17f2c172621.Coremail.wudaemon@163.com>
2022-02-24 16:12     ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).