diff mbox series

[net-next] net: hso: Use BIT(x) macro

Message ID 20210529114421.25480-1-yuehaibing@huawei.com (mailing list archive)
State Rejected
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: hso: Use BIT(x) macro | expand

Checks

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 6 maintainers not CCed: oneukum@suse.com johan@kernel.org mail@anirudhrb.com dan.carpenter@oracle.com geert@linux-m68k.org zhengyongjun3@huawei.com
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: 5 this patch: 5
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, 20 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 5 this patch: 5
netdev/header_inline success Link

Commit Message

Yue Haibing May 29, 2021, 11:44 a.m. UTC
BIT(x) improves readability and safety with respect to shifts.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/usb/hso.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 63006838bdcc..2587f8f52226 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -163,13 +163,13 @@  enum rx_ctrl_state{
 #define W_VALUE         (0x0)
 #define W_LENGTH        (0x2)
 
-#define B_OVERRUN       (0x1<<6)
-#define B_PARITY        (0x1<<5)
-#define B_FRAMING       (0x1<<4)
-#define B_RING_SIGNAL   (0x1<<3)
-#define B_BREAK         (0x1<<2)
-#define B_TX_CARRIER    (0x1<<1)
-#define B_RX_CARRIER    (0x1<<0)
+#define B_OVERRUN       BIT(6)
+#define B_PARITY        BIT(5)
+#define B_FRAMING       BIT(4)
+#define B_RING_SIGNAL   BIT(3)
+#define B_BREAK         BIT(2)
+#define B_TX_CARRIER    BIT(1)
+#define B_RX_CARRIER    BIT(0)
 
 struct hso_serial_state_notification {
 	u8 bmRequestType;