drivers/net/hamradio/ : Use of time_after_eq macro
Subsystems (2)
PATCH 1/1 drivers/net/hamradio/ : 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.
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/hamradio/baycom_epp.c +2 -1
@@ -54,6 +54,7 @@#include <linux/kmod.h> #include <linux/hdlcdrv.h> #include <linux/baycom.h> +#include <linux/jiffies.h> #if defined(CONFIG_AX25 ) || defined(CONFIG_AX25_MODULE )/* prototypes for ax25_encapsulate and ax25_rebuild_header */ #include <net/ax25.h>
@@ -287,7 +288,7 @@* measure the interrupt frequency */ bc->debug_vals.cur_intcnt++; -if ((cur_jiffies - bc->debug_vals.last_jiffies) >=HZ ) { +if (time_after_eq (cur_jiffies, bc->debug_vals.last_jiffies +HZ )) { bc->debug_vals.last_jiffies = cur_jiffies; bc->debug_vals.last_intcnt = bc->debug_vals.cur_intcnt; bc->debug_vals.cur_intcnt =0 ;
drivers/net/hamradio/baycom_par.c +2 -1
@@ -84,6 +84,7 @@#include <linux/baycom.h> #include <linux/parport.h> #include <linux/bitops.h> +#include <linux/jiffies.h> #include <asm/bug.h> #include <asm/system.h>
@@ -165,7 +166,7 @@* measure the interrupt frequency */ bc->debug_vals.cur_intcnt++; -if ((cur_jiffies - bc->debug_vals.last_jiffies) >=HZ ) { +if (time_after_eq (cur_jiffies, bc->debug_vals.last_jiffies +HZ )) { bc->debug_vals.last_jiffies = cur_jiffies; bc->debug_vals.last_intcnt = bc->debug_vals.cur_intcnt; bc->debug_vals.cur_intcnt =0 ;
drivers/net/hamradio/baycom_ser_fdx.c +2 -1
@@ -79,6 +79,7 @@#include <asm/io.h> #include <linux/hdlcdrv.h> #include <linux/baycom.h> +#include <linux/jiffies.h> /* --------------------------------------------------------------------- */
@@ -159,7 +160,7 @@* measure the interrupt frequency */ bc->debug_vals.cur_intcnt++; -if ((cur_jiffies - bc->debug_vals.last_jiffies) >=HZ ) { +if (time_after_eq (cur_jiffies, bc->debug_vals.last_jiffies +HZ )) { bc->debug_vals.last_jiffies = cur_jiffies; bc->debug_vals.last_intcnt = bc->debug_vals.cur_intcnt; bc->debug_vals.cur_intcnt =0 ;
drivers/net/hamradio/baycom_ser_hdx.c +2 -1
@@ -69,6 +69,7 @@#include <asm/io.h> #include <linux/hdlcdrv.h> #include <linux/baycom.h> +#include <linux/jiffies.h> /* --------------------------------------------------------------------- */
@@ -150,7 +151,7 @@* measure the interrupt frequency */ bc->debug_vals.cur_intcnt++; -if ((cur_jiffies - bc->debug_vals.last_jiffies) >=HZ ) { +if (time_after_eq (cur_jiffies, bc->debug_vals.last_jiffies +HZ )) { bc->debug_vals.last_jiffies = cur_jiffies; bc->debug_vals.last_intcnt = bc->debug_vals.cur_intcnt; bc->debug_vals.cur_intcnt =0 ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors