Message ID | 2907e1496de66f59236ee6ebc84292b1454926d3.1618231618.git.alinesantanacordeiro@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [Outreachy,kernel,1/4,v2] staging: media: omap4iss: Replace macro function by static inline function in file iss.c | expand |
Hi Aline, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Aline-Santana-Cordeiro/staging-media-omap4iss-Replace-macro-function-by-static-inline-function-in-file-iss-c/20210412-215756 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git f2f560e1bdc055a6a306e6b7823ba589794e6564 config: mips-randconfig-r013-20210412 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://github.com/0day-ci/linux/commit/227d208756f87cbe3c143fa2a3a8f91103c6858e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Aline-Santana-Cordeiro/staging-media-omap4iss-Replace-macro-function-by-static-inline-function-in-file-iss-c/20210412-215756 git checkout 227d208756f87cbe3c143fa2a3a8f91103c6858e # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/staging/media/omap4iss/iss_ipipeif.c:39:15: error: member reference type 'int' is not a pointer dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", ~~~ ^ include/linux/dev_printk.h:131:26: note: expanded from macro 'dev_dbg' dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:34: error: expected ')' dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", ^ drivers/staging/media/omap4iss/iss_ipipeif.c:39:2: note: to match this '(' dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", ^ include/linux/dev_printk.h:131:13: note: expanded from macro 'dev_dbg' dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^ drivers/staging/media/omap4iss/iss_ipipeif.c:45:15: error: member reference type 'int' is not a pointer dev_dbg(iss->dev, "###ISIF " #name "=0x%08x\n", ~~~ ^ include/linux/dev_printk.h:131:26: note: expanded from macro 'dev_dbg' dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^~~ drivers/staging/media/omap4iss/iss_ipipeif.c:45:31: error: expected ')' dev_dbg(iss->dev, "###ISIF " #name "=0x%08x\n", ^ drivers/staging/media/omap4iss/iss_ipipeif.c:45:2: note: to match this '(' dev_dbg(iss->dev, "###ISIF " #name "=0x%08x\n", ^ include/linux/dev_printk.h:131:13: note: expanded from macro 'dev_dbg' dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^ drivers/staging/media/omap4iss/iss_ipipeif.c:51:15: error: member reference type 'int' is not a pointer dev_dbg(iss->dev, "###ISP5 " #name "=0x%08x\n", ~~~ ^ include/linux/dev_printk.h:131:26: note: expanded from macro 'dev_dbg' dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^~~ drivers/staging/media/omap4iss/iss_ipipeif.c:51:31: error: expected ')' dev_dbg(iss->dev, "###ISP5 " #name "=0x%08x\n", ^ drivers/staging/media/omap4iss/iss_ipipeif.c:51:2: note: to match this '(' dev_dbg(iss->dev, "###ISP5 " #name "=0x%08x\n", ^ include/linux/dev_printk.h:131:13: note: expanded from macro 'dev_dbg' dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^ drivers/staging/media/omap4iss/iss_ipipeif.c:61:30: error: use of undeclared identifier 'CFG1' ipipeif_print_register(iss, CFG1); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:62:30: error: use of undeclared identifier 'CFG2' ipipeif_print_register(iss, CFG2); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:64:27: error: use of undeclared identifier 'SYNCEN' isif_print_register(iss, SYNCEN); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:65:27: error: use of undeclared identifier 'CADU' isif_print_register(iss, CADU); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:66:27: error: use of undeclared identifier 'CADL' isif_print_register(iss, CADL); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:67:27: error: use of undeclared identifier 'MODESET' isif_print_register(iss, MODESET); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:68:27: error: use of undeclared identifier 'CCOLP' isif_print_register(iss, CCOLP); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:69:27: error: use of undeclared identifier 'SPH' isif_print_register(iss, SPH); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:70:27: error: use of undeclared identifier 'LNH' isif_print_register(iss, LNH); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:71:27: error: use of undeclared identifier 'LNV' isif_print_register(iss, LNV); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:72:27: error: implicit declaration of function 'VDINT' [-Werror,-Wimplicit-function-declaration] isif_print_register(iss, VDINT(0)); ^ drivers/staging/media/omap4iss/iss_ipipeif.c:72:22: warning: incompatible pointer to integer conversion passing 'struct iss_device *' to parameter of type 'int' [-Wint-conversion] isif_print_register(iss, VDINT(0)); ^~~ drivers/staging/media/omap4iss/iss_ipipeif.c:73:27: error: use of undeclared identifier 'HSIZE' isif_print_register(iss, HSIZE); ^ >> drivers/staging/media/omap4iss/iss_ipipeif.c:75:27: error: use of undeclared identifier 'SYSCONFIG' isp5_print_register(iss, SYSCONFIG); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 1 warning and 20 errors generated. vim +/SYSCONFIG +75 drivers/staging/media/omap4iss/iss_ipipeif.c 54 55 static void ipipeif_print_status(struct iss_ipipeif_device *ipipeif) 56 { 57 struct iss_device *iss = to_iss_device(ipipeif); 58 59 dev_dbg(iss->dev, "-------------IPIPEIF Register dump-------------\n"); 60 61 ipipeif_print_register(iss, CFG1); 62 ipipeif_print_register(iss, CFG2); 63 64 isif_print_register(iss, SYNCEN); 65 isif_print_register(iss, CADU); 66 isif_print_register(iss, CADL); 67 isif_print_register(iss, MODESET); 68 isif_print_register(iss, CCOLP); 69 isif_print_register(iss, SPH); 70 isif_print_register(iss, LNH); 71 isif_print_register(iss, LNV); 72 isif_print_register(iss, VDINT(0)); 73 isif_print_register(iss, HSIZE); 74 > 75 isp5_print_register(iss, SYSCONFIG); 76 isp5_print_register(iss, CTRL); 77 isp5_print_register(iss, IRQSTATUS(0)); 78 isp5_print_register(iss, IRQENABLE_SET(0)); 79 isp5_print_register(iss, IRQENABLE_CLR(0)); 80 81 dev_dbg(iss->dev, "-----------------------------------------------\n"); 82 } 83 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/staging/media/omap4iss/iss_ipipeif.c b/drivers/staging/media/omap4iss/iss_ipipeif.c index c2978d0..3dc98f6 100644 --- a/drivers/staging/media/omap4iss/iss_ipipeif.c +++ b/drivers/staging/media/omap4iss/iss_ipipeif.c @@ -34,17 +34,23 @@ 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) { @@ -52,25 +58,25 @@ static void ipipeif_print_status(struct iss_ipipeif_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"); }
Replace macro function by static inline function. Issue suggested by Julia. Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@gmail.com> --- Changes since v1: - Insert file path in commit message drivers/staging/media/omap4iss/iss_ipipeif.c | 62 +++++++++++++++------------- 1 file changed, 34 insertions(+), 28 deletions(-)