drivers/net/es3210.c : Use of the time_after() macro
Subsystems (2)
PATCH 1/1 drivers/net/es3210.c : Use of the time_after() macro
Use of the time_after() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.
drivers/net/es3210.c +2 -1
@@ -56,6 +56,7 @@#include <linux/init.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> +#include <linux/jiffies.h> #include <asm/io.h> #include <asm/system.h>
@@ -331,7 +332,7 @@if (ei_debug >1 )printk ("%s: resetting the ES3210..." , dev->name); end = jiffies +2 *HZ /100 ; -while ((signed )(end - jiffies) >0 )continue ; +while (time_after (end, jiffies))continue ; ei_status.txing =0 ;outb (0x01 , ioaddr +ES_RESET_PORT );
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 18 lines · Marcelo Feitoza Parisi
Use of the
time_after()macro, defined atlinux/jiffies.h, which deal with wrapping correctly and are nicer to read.Signed-off-by Marcelo Feitoza Parisi <[email protected]>drivers/net/es3210.c +1
-0@@ -56,6 +56,7 @@#include <linux/init.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> +#include <linux/jiffies.h> #include <asm/io.h> #include <asm/system.h>
drivers/net/es3210.c line 335
Quoted 5 lines
drivers/net/es3210.c +1
-1@@ -331,7 +332,7 @@if (ei_debug >1 )printk ("%s: resetting the ES3210..." , dev->name); end = jiffies +2 *HZ /100 ; -while ((signed )(end - jiffies) >0 )continue ; +while (time_after (end, jiffies))continue ;
Seems like I missed this on the first review...
msleep(20) should be much better here.
Quoted 8 lines
drivers/net/es3210.c +0
-0ei_status.txing =0 ;outb (0x01 , ioaddr +ES_RESET_PORT );_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors