drivers/net/ns83820.c : Use of time_after_eq macro
Subsystems (2)
PATCH 1/1 drivers/net/ns83820.c : Use of time_after_eq macro
Use of the time_after_eq() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.
Signed-off-by Marcelo Feitoza Parisi <[email protected]>
drivers/net/ns83820.c +3 -2
@@ -116,6 +116,7 @@#include <linux/ethtool.h> #include <linux/timer.h> #include <linux/if_vlan.h> +#include <linux/jiffies.h> #include <asm/io.h> #include <asm/uaccess.h>
@@ -1610,7 +1611,7 @@ {struct ns83820 *dev =PRIV (ndev);int timed_out =0 ; -long start; +unsigned long start;u32 status;int loops =0 ;
@@ -1628,7 +1629,7 @@break ;if (status & fail)break ; -if ((jiffies - start) >=HZ ) { +if (time_after_eq (jiffies, start +HZ )) { timed_out =1 ;break ; }
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors