[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <e302566a3d9e5180ab27eb2c2824fd1b678a6d99.1618231618.git.alinesantanacordeiro@gmail.com>
Date: Mon, 12 Apr 2021 09:57:09 -0300
From: Aline Santana Cordeiro <alinesantanacordeiro@...il.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-media@...r.kernel.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org, outreachy-kernel@...glegroups.com
Subject: [Outreachy kernel][PATCH 1/4 v2] staging: media: omap4iss: Replace
macro function by static inline function in file iss.c
Replace macro function by static inline function.
Issue suggested by Julia.
Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@...il.com>
---
Changes since v1:
- Insert file path in commit message
drivers/staging/media/omap4iss/iss.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c
index c89f268a..3bbc39e 100644
--- a/drivers/staging/media/omap4iss/iss.c
+++ b/drivers/staging/media/omap4iss/iss.c
@@ -27,22 +27,24 @@
#include "iss.h"
#include "iss_regs.h"
-#define ISS_PRINT_REGISTER(iss, name)\
- dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n", \
- iss_reg_read(iss, OMAP4_ISS_MEM_TOP, ISS_##name))
+static inline iss_print_register(iss, name)
+{
+ dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
+ iss_reg_read(iss, OMAP4_ISS_MEM_TOP, ISS_##name));
+}
static void iss_print_status(struct iss_device *iss)
{
dev_dbg(iss->dev, "-------------ISS HL Register dump-------------\n");
- ISS_PRINT_REGISTER(iss, HL_REVISION);
- ISS_PRINT_REGISTER(iss, HL_SYSCONFIG);
- ISS_PRINT_REGISTER(iss, HL_IRQSTATUS(5));
- ISS_PRINT_REGISTER(iss, HL_IRQENABLE_SET(5));
- ISS_PRINT_REGISTER(iss, HL_IRQENABLE_CLR(5));
- ISS_PRINT_REGISTER(iss, CTRL);
- ISS_PRINT_REGISTER(iss, CLKCTRL);
- ISS_PRINT_REGISTER(iss, CLKSTAT);
+ iss_print_register(iss, HL_REVISION);
+ iss_print_register(iss, HL_SYSCONFIG);
+ iss_print_register(iss, HL_IRQSTATUS(5));
+ iss_print_register(iss, HL_IRQENABLE_SET(5));
+ iss_print_register(iss, HL_IRQENABLE_CLR(5));
+ iss_print_register(iss, CTRL);
+ iss_print_register(iss, CLKCTRL);
+ iss_print_register(iss, CLKSTAT);
dev_dbg(iss->dev, "-----------------------------------------------\n");
}
--
2.7.4
Powered by blists - more mailing lists