[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN7PR07MB419563C5B405ED4082D7841DF65D9@BN7PR07MB4195.namprd07.prod.outlook.com>
Date: Wed, 5 Oct 2022 16:10:44 +0000
From: Brent Pappas <pappasbrent@...ghts.ucf.edu>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: "cai.huoqing@...ux.dev" <cai.huoqing@...ux.dev>,
"kuba@...nel.org" <kuba@...nel.org>,
"linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] staging: most: net: Replace macros HB and LB with static
inline functions
Replace function-like macros "HB" and "LB" with static inline functions
to comply with preferred Linux coding style standards.
Signed-off-by: Brent Pappas <pappasbrent@...ghts.ucf.edu>
---
diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c
index 1d1fe8bff7ee..8a8fbc274b73 100644
--- a/drivers/staging/most/net/net.c
+++ b/drivers/staging/most/net/net.c
@@ -36,8 +36,8 @@
#define PMS_TELID_MASK 0x0F
#define PMS_TELID_SHIFT 4
-#define HB(value) ((u8)((u16)(value) >> 8))
-#define LB(value) ((u8)(value))
+static inline u8 HB(unsigned int value) { return ((u8)((u16)(value) >> 8)); }
+static inline u8 LB(unsigned int value) { return ((u8)(value)); }
#define EXTRACT_BIT_SET(bitset_name, value) \
(((value) >> bitset_name##_SHIFT) & bitset_name##_MASK)
Powered by blists - more mailing lists