public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: most: net: Replace macros HB and LB with static inline functions
@ 2022-10-05 16:10 Brent Pappas
  2022-10-05 23:57 ` Nam Cao
  0 siblings, 1 reply; 9+ messages in thread
From: Brent Pappas @ 2022-10-05 16:10 UTC (permalink / raw)
  To: gregkh@linuxfoundation.org
  Cc: cai.huoqing@linux.dev, kuba@kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org

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@knights.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)

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-20 15:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-05 16:10 [PATCH] staging: most: net: Replace macros HB and LB with static inline functions Brent Pappas
2022-10-05 23:57 ` Nam Cao
2022-10-06  1:39   ` Brent Pappas
2022-10-06 13:21   ` Brent Pappas
2022-10-06 13:42     ` Nam Cao
2022-10-06 17:02       ` [PATCH v2] " Brent Pappas
2022-10-06 17:44         ` Nam Cao
2022-10-06 23:07           ` [PATCH v3] " Brent Pappas
2022-10-20 15:25             ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox