lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210529114559.24604-1-yuehaibing@huawei.com>
Date:   Sat, 29 May 2021 19:45:59 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <davem@...emloft.net>, <kuba@...nel.org>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH net-next] pktgen: Use BIT(x) macro

BIT(x) improves readability and safety with respect to shifts.

Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 net/core/pktgen.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 3fba429f1f57..2915153458aa 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -218,10 +218,10 @@ static char *pkt_flag_names[] = {
 #define NR_PKT_FLAGS		ARRAY_SIZE(pkt_flag_names)
 
 /* Thread control flag bits */
-#define T_STOP        (1<<0)	/* Stop run */
-#define T_RUN         (1<<1)	/* Start run */
-#define T_REMDEVALL   (1<<2)	/* Remove all devs */
-#define T_REMDEV      (1<<3)	/* Remove one dev */
+#define T_STOP        BIT(0)	/* Stop run */
+#define T_RUN         BIT(1)	/* Start run */
+#define T_REMDEVALL   BIT(2)	/* Remove all devs */
+#define T_REMDEV      BIT(3)	/* Remove one dev */
 
 /* Xmit modes */
 #define M_START_XMIT		0	/* Default normal TX */
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ