Thread (14 messages) 14 messages, 3 authors, 2026-03-26
STALE89d

[PATCH net-next v1 7/7] net: hsr: use BIT() macro for bit shift constant

From: <hidden>
Date: 2026-03-24 14:47:03
Also in: lkml
Subsystem: hsr network protocol, networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Luka Gejak <redacted>

Replace the explicit bit shift (1 << HSR_SEQ_BLOCK_SHIFT) with the
standardized BIT() macro for defining HSR_SEQ_BLOCK_SIZE. This improves
readability and aligns with kernel coding conventions.

Signed-off-by: Luka Gejak <redacted>
---
 net/hsr/hsr_framereg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/hsr/hsr_framereg.h b/net/hsr/hsr_framereg.h
index c65ecb925734..cb731ee0ce5c 100644
--- a/net/hsr/hsr_framereg.h
+++ b/net/hsr/hsr_framereg.h
@@ -79,7 +79,7 @@ struct hsr_seq_block *hsr_get_seq_block(struct hsr_node *node, u16 block_idx);
 #endif
 
 #define HSR_SEQ_BLOCK_SHIFT 7 /* 128 bits */
-#define HSR_SEQ_BLOCK_SIZE (1 << HSR_SEQ_BLOCK_SHIFT)
+#define HSR_SEQ_BLOCK_SIZE BIT(HSR_SEQ_BLOCK_SHIFT)
 #define HSR_SEQ_BLOCK_MASK (HSR_SEQ_BLOCK_SIZE - 1)
 #define HSR_MAX_SEQ_BLOCKS 64
 
-- 
2.53.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help