Message ID | 20210529114559.24604-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] pktgen: Use BIT(x) macro | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 4 maintainers not CCed: yebin10@huawei.com gustavoars@kernel.org zhudi21@huawei.com dev@ooseel.net |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 14 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On Sat, 29 May 2021 19:45:59 +0800 YueHaibing wrote:
> BIT(x) improves readability and safety with respect to shifts.
Some developers prefer not to use BIT(). I'm not applying these.
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 */
BIT(x) improves readability and safety with respect to shifts. Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- net/core/pktgen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)