Message ID | 808aaecdd2783cd1c216ba5ca3d592242731e73a.1618230425.git.alinesantanacordeiro@gmail.com |
---|---|
State | New |
Headers | show |
Series | [Outreachy,kernel,1/4] Replace macro function by static inline function in file iss.c | expand |
Hi Aline, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v5.12-rc7 next-20210412] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Aline-Santana-Cordeiro/Replace-macro-function-by-static-inline-function-in-file-iss-c/20210412-213252 base: git://linuxtv.org/media_tree.git master config: arc-allyesconfig (attached as .config) compiler: arceb-elf-gcc (GCC) 9.3.0 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 # https://github.com/0day-ci/linux/commit/8845073e7a4b434b2bc32818bfa172e91075a167 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Aline-Santana-Cordeiro/Replace-macro-function-by-static-inline-function-in-file-iss-c/20210412-213252 git checkout 8845073e7a4b434b2bc32818bfa172e91075a167 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): drivers/staging/media/omap4iss/iss_ipipeif.c:37:15: error: return type defaults to 'int' [-Werror=return-type] 37 | static inline ipipeif_print_register(iss, name) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:37:15: error: function declaration isn't a prototype [-Werror=strict-prototypes] drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_print_register': >> drivers/staging/media/omap4iss/iss_ipipeif.c:37:15: warning: old-style function definition [-Wold-style-definition] >> drivers/staging/media/omap4iss/iss_ipipeif.c:37:15: warning: type of 'iss' defaults to 'int' [-Wmissing-parameter-type] >> drivers/staging/media/omap4iss/iss_ipipeif.c:37:15: warning: type of 'name' defaults to 'int' [-Wmissing-parameter-type] In file included from include/linux/printk.h:409, from include/linux/kernel.h:16, from include/linux/list.h:9, from include/linux/module.h:12, from drivers/staging/media/omap4iss/iss_ipipeif.c:10: drivers/staging/media/omap4iss/iss_ipipeif.c:39:34: error: stray '#' in program 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^ include/linux/dynamic_debug.h:91:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA' 91 | .format = (fmt), \ | ^~~ include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call' 147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call' 161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \ | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:2: note: in expansion of macro 'dev_dbg' 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:35: error: expected ')' before 'name' 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^~~~ include/linux/dynamic_debug.h:91:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA' 91 | .format = (fmt), \ | ^~~ include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call' 147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call' 161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \ | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:2: note: in expansion of macro 'dev_dbg' 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^~~~~~~ include/linux/dynamic_debug.h:91:13: note: to match this '(' 91 | .format = (fmt), \ | ^ include/linux/dynamic_debug.h:127:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA' 127 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call' 147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call' 161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \ | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:2: note: in expansion of macro 'dev_dbg' 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:13: error: invalid type argument of '->' (have 'int') 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^~ include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call' 129 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call' 161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \ | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:2: note: in expansion of macro 'dev_dbg' 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:34: error: stray '#' in program 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^ include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call' 129 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call' 161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \ | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:2: note: in expansion of macro 'dev_dbg' 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", | ^~~~~~~ drivers/staging/media/omap4iss/iss_ipipeif.c:39:35: error: expected ')' before 'name' 39 | dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", vim +37 drivers/staging/media/omap4iss/iss_ipipeif.c 30 31 /* 32 * ipipeif_print_status - Print current IPIPEIF Module register values. 33 * @ipipeif: Pointer to ISS ISP IPIPEIF device. 34 * 35 * Also prints other debug information stored in the IPIPEIF module. 36 */ > 37 static inline ipipeif_print_register(iss, name) 38 { 39 dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", 40 iss_reg_read(iss, OMAP4_ISS_MEM_ISP_IPIPEIF, IPIPEIF_##name)); 41 } 42 --- 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> --- drivers/staging/media/omap4iss/iss_ipipeif.c | 62 +++++++++++++++------------- 1 file changed, 34 insertions(+), 28 deletions(-)