Re: [PATCH 5/5] media: atomisp: get rid of -Wsuggest-attribute=format warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mauro,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[cannot apply to staging/staging-testing linus/master v5.9-rc3 next-20200903]
[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/Mauro-Carvalho-Chehab/address-W-1-warnings-at-staging-media-atomisp/20200903-220729
base:   git://linuxtv.org/media_tree.git master
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

   drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: In function '__set_css_print_env':
>> drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:861:50: error: assignment to 'int (*)(const char *, char *)' from incompatible pointer type 'int (__attribute__((regparm(0))) *)(const char *, char *)' [-Werror=incompatible-pointer-types]
     861 |   isp->css_env.isp_css_env.print_env.debug_print = vprintk;
         |                                                  ^
   drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: In function 'atomisp_css_load_firmware':
   drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:894:49: error: assignment to 'int (*)(const char *, char *)' from incompatible pointer type 'int (__attribute__((regparm(0))) *)(const char *, char *)' [-Werror=incompatible-pointer-types]
     894 |  isp->css_env.isp_css_env.print_env.error_print = vprintk;
         |                                                 ^
   cc1: some warnings being treated as errors
--
   drivers/staging/media/atomisp/pci/sh_css.c: In function 'ia_css_init':
>> drivers/staging/media/atomisp/pci/sh_css.c:1685:16: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format]
    1685 |  sh_css_printf = env->print_env.debug_print;
         |                ^

# https://github.com/0day-ci/linux/commit/bee6e6549cd6c55a1d62347514bb1cb11acd6aca
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mauro-Carvalho-Chehab/address-W-1-warnings-at-staging-media-atomisp/20200903-220729
git checkout bee6e6549cd6c55a1d62347514bb1cb11acd6aca
vim +861 drivers/staging/media/atomisp/pci/atomisp_compat_css20.c

   850	
   851	static inline int __set_css_print_env(struct atomisp_device *isp, int opt)
   852	{
   853		int ret = 0;
   854	
   855		if (opt == 0)
   856			isp->css_env.isp_css_env.print_env.debug_print = NULL;
   857		else if (opt == 1)
   858			isp->css_env.isp_css_env.print_env.debug_print =
   859			    atomisp_css2_dbg_ftrace_print;
   860		else if (opt == 2)
 > 861			isp->css_env.isp_css_env.print_env.debug_print = vprintk;
   862		else
   863			ret = -EINVAL;
   864	
   865		return ret;
   866	}
   867	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux