[<prev] [next>] [day] [month] [year] [list]
Message-ID: <d55b486bf3778576d1ecbec4ede5c992140eb0e9.1618231618.git.alinesantanacordeiro@gmail.com>
Date: Mon, 12 Apr 2021 09:57:14 -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 2/4 v2] staging: media: omap4iss: Replace
macro function by static inline function in file iss_ipipe.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_ipipe.c | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c b/drivers/staging/media/omap4iss/iss_ipipe.c
index 26be078..09c941c 100644
--- a/drivers/staging/media/omap4iss/iss_ipipe.c
+++ b/drivers/staging/media/omap4iss/iss_ipipe.c
@@ -38,9 +38,11 @@ static const unsigned int ipipe_fmts[] = {
*
* Also prints other debug information stored in the IPIPE module.
*/
-#define IPIPE_PRINT_REGISTER(iss, name)\
- dev_dbg(iss->dev, "###IPIPE " #name "=0x%08x\n", \
- iss_reg_read(iss, OMAP4_ISS_MEM_ISP_IPIPE, IPIPE_##name))
+static inline ipipe_print_register(iss, name)
+{
+ dev_dbg(iss->dev, "###IPIPE " #name "=0x%08x\n",
+ iss_reg_read(iss, OMAP4_ISS_MEM_ISP_IPIPE, IPIPE_##name));
+}
static void ipipe_print_status(struct iss_ipipe_device *ipipe)
{
@@ -48,16 +50,16 @@ static void ipipe_print_status(struct iss_ipipe_device *ipipe)
dev_dbg(iss->dev, "-------------IPIPE Register dump-------------\n");
- IPIPE_PRINT_REGISTER(iss, SRC_EN);
- IPIPE_PRINT_REGISTER(iss, SRC_MODE);
- IPIPE_PRINT_REGISTER(iss, SRC_FMT);
- IPIPE_PRINT_REGISTER(iss, SRC_COL);
- IPIPE_PRINT_REGISTER(iss, SRC_VPS);
- IPIPE_PRINT_REGISTER(iss, SRC_VSZ);
- IPIPE_PRINT_REGISTER(iss, SRC_HPS);
- IPIPE_PRINT_REGISTER(iss, SRC_HSZ);
- IPIPE_PRINT_REGISTER(iss, GCK_MMR);
- IPIPE_PRINT_REGISTER(iss, YUV_PHS);
+ ipipe_print_register(iss, SRC_EN);
+ ipipe_print_register(iss, SRC_MODE);
+ ipipe_print_register(iss, SRC_FMT);
+ ipipe_print_register(iss, SRC_COL);
+ ipipe_print_register(iss, SRC_VPS);
+ ipipe_print_register(iss, SRC_VSZ);
+ ipipe_print_register(iss, SRC_HPS);
+ ipipe_print_register(iss, SRC_HSZ);
+ ipipe_print_register(iss, GCK_MMR);
+ ipipe_print_register(iss, YUV_PHS);
dev_dbg(iss->dev, "-----------------------------------------------\n");
}
--
2.7.4
Powered by blists - more mailing lists