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

luka.gejak
2026-03-24T14:47:03Z

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 <luka.gejak@linux.dev>
---
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