Skip to content

Commit

Permalink
staging: media: omap4iss: Replace macro function by static inline fun…
Browse files Browse the repository at this point in the history
…ction in file iss_ipipeif.c

Replace macro function by static inline function.
Issue suggested by Julia.

Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@gmail.com>
  • Loading branch information
ascordeiro authored and intel-lab-lkp committed Apr 12, 2021
1 parent cf96ab0 commit 227d208
Showing 1 changed file with 34 additions and 28 deletions.
62 changes: 34 additions & 28 deletions drivers/staging/media/omap4iss/iss_ipipeif.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,49 @@ static const unsigned int ipipeif_fmts[] = {
*
* Also prints other debug information stored in the IPIPEIF module.
*/
#define IPIPEIF_PRINT_REGISTER(iss, name)\
dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", \
iss_reg_read(iss, OMAP4_ISS_MEM_ISP_IPIPEIF, IPIPEIF_##name))
static inline ipipeif_print_register(iss, name)
{
dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n",
iss_reg_read(iss, OMAP4_ISS_MEM_ISP_IPIPEIF, IPIPEIF_##name));
}

#define ISIF_PRINT_REGISTER(iss, name)\
dev_dbg(iss->dev, "###ISIF " #name "=0x%08x\n", \
iss_reg_read(iss, OMAP4_ISS_MEM_ISP_ISIF, ISIF_##name))
static inline isif_print_register(iss, name)
{
dev_dbg(iss->dev, "###ISIF " #name "=0x%08x\n",
iss_reg_read(iss, OMAP4_ISS_MEM_ISP_ISIF, ISIF_##name));
}

#define ISP5_PRINT_REGISTER(iss, name)\
dev_dbg(iss->dev, "###ISP5 " #name "=0x%08x\n", \
iss_reg_read(iss, OMAP4_ISS_MEM_ISP_SYS1, ISP5_##name))
static inline isp5_print_register(iss, name)
{
dev_dbg(iss->dev, "###ISP5 " #name "=0x%08x\n",
iss_reg_read(iss, OMAP4_ISS_MEM_ISP_SYS1, ISP5_##name));
}

static void ipipeif_print_status(struct iss_ipipeif_device *ipipeif)
{
struct iss_device *iss = to_iss_device(ipipeif);

dev_dbg(iss->dev, "-------------IPIPEIF Register dump-------------\n");

IPIPEIF_PRINT_REGISTER(iss, CFG1);
IPIPEIF_PRINT_REGISTER(iss, CFG2);

ISIF_PRINT_REGISTER(iss, SYNCEN);
ISIF_PRINT_REGISTER(iss, CADU);
ISIF_PRINT_REGISTER(iss, CADL);
ISIF_PRINT_REGISTER(iss, MODESET);
ISIF_PRINT_REGISTER(iss, CCOLP);
ISIF_PRINT_REGISTER(iss, SPH);
ISIF_PRINT_REGISTER(iss, LNH);
ISIF_PRINT_REGISTER(iss, LNV);
ISIF_PRINT_REGISTER(iss, VDINT(0));
ISIF_PRINT_REGISTER(iss, HSIZE);

ISP5_PRINT_REGISTER(iss, SYSCONFIG);
ISP5_PRINT_REGISTER(iss, CTRL);
ISP5_PRINT_REGISTER(iss, IRQSTATUS(0));
ISP5_PRINT_REGISTER(iss, IRQENABLE_SET(0));
ISP5_PRINT_REGISTER(iss, IRQENABLE_CLR(0));
ipipeif_print_register(iss, CFG1);
ipipeif_print_register(iss, CFG2);

isif_print_register(iss, SYNCEN);
isif_print_register(iss, CADU);
isif_print_register(iss, CADL);
isif_print_register(iss, MODESET);
isif_print_register(iss, CCOLP);
isif_print_register(iss, SPH);
isif_print_register(iss, LNH);
isif_print_register(iss, LNV);
isif_print_register(iss, VDINT(0));
isif_print_register(iss, HSIZE);

isp5_print_register(iss, SYSCONFIG);
isp5_print_register(iss, CTRL);
isp5_print_register(iss, IRQSTATUS(0));
isp5_print_register(iss, IRQENABLE_SET(0));
isp5_print_register(iss, IRQENABLE_CLR(0));

dev_dbg(iss->dev, "-----------------------------------------------\n");
}
Expand Down

0 comments on commit 227d208

Please sign in to comment.