All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: fwserial: Convert macro into an inline function
@ 2019-03-06 22:48 Madhumitha Prabakaran
  2019-03-07 20:03 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Madhumitha Prabakaran @ 2019-03-06 22:48 UTC (permalink / raw)
  To: gregkh, outreachy-kernel; +Cc: Madhumitha Prabakaran

Convert macro into an inline function to make codebase better

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
---
 drivers/staging/fwserial/fwserial.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index a1b90ea7fcb8..aec0f19597a9 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -19,7 +19,10 @@
 
 #include "fwserial.h"
 
-#define be32_to_u64(hi, lo)  ((u64)be32_to_cpu(hi) << 32 | be32_to_cpu(lo))
+inline u64 be32_to_u64(__be32 hi, __be32 lo)
+{
+	return ((u64)be32_to_cpu(hi) << 32 | be32_to_cpu(lo));
+}
 
 #define LINUX_VENDOR_ID   0xd00d1eU  /* same id used in card root directory   */
 #define FWSERIAL_VERSION  0x00e81cU  /* must be unique within LINUX_VENDOR_ID */
-- 
2.17.1



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

end of thread, other threads:[~2019-03-07 20:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-06 22:48 [PATCH] Staging: fwserial: Convert macro into an inline function Madhumitha Prabakaran
2019-03-07 20:03 ` Greg KH
2019-03-07 20:08   ` [Outreachy kernel] " Julia Lawall
2019-03-07 20:20     ` Greg KH
2019-03-07 20:27       ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.