net: qlcnic: use time_is_before_jiffies() instead of open coding it
Subsystems (3)
PATCH 1/1 net: qlcnic: use time_is_before_jiffies() instead of open coding it
From: Wang Qing <[email protected]>
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by Wang Qing <[email protected]>
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +2 -1
@@ -10,6 +10,7 @@#include <linux/ipv6.h> #include <net/checksum.h> #include <linux/printk.h> +#include <linux/jiffies.h> #include "qlcnic.h"
@@ -332,7 +333,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter,hlist_for_each_entry_safe (tmp_fil, n, head, fnode) {if (ether_addr_equal (tmp_fil->faddr, (u8 *)&src_addr) && tmp_fil->vlan_id == vlan_id) { -if (jiffies > (QLCNIC_READD_AGE *HZ + tmp_fil->ftime)) +if (time_is_before_jiffies (QLCNIC_READD_AGE *HZ + tmp_fil->ftime))qlcnic_change_filter (adapter, &src_addr, vlan_id, tx_ring); tmp_fil->ftime = jiffies;
Signature · 1 line
2.7.4
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 8 lines · On Sun, 27 Feb 2022 19:13:00 -0800 you wrote:
From: Wang Qing <[email protected]>
Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Signed-off-by Wang Qing <[email protected]>[...]
Here is the summary with links:
- net: qlcnic: use time_is_before_jiffies() instead of open coding it
https://git.kernel.org/netdev/net-next/c/3b6cab7b5a2f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html