Re: [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err()

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

 



Hi Mauro,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Mauro-Dreissig/staging-rtl8712-Code-simplifications/20200705-082433
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 14442181d20490945f341644bb8257e334b01447
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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 warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/usb/ch9.h:36,
                    from include/linux/usb.h:6,
                    from drivers/staging/rtl8712/hal_init.c:19:
   drivers/staging/rtl8712/hal_init.c: In function 'rtl871x_open_fw':
>> drivers/staging/rtl8712/hal_init.c:71:35: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'const unsigned int'} [-Wformat=]
      71 |   dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
>> drivers/staging/rtl8712/hal_init.c:71:3: note: in expansion of macro 'dev_err'
      71 |   dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
         |   ^~~~~~~
   drivers/staging/rtl8712/hal_init.c:71:62: note: format string is defined here
      71 |   dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
         |                                                            ~~^
         |                                                              |
         |                                                              long unsigned int
         |                                                            %u

vim +71 drivers/staging/rtl8712/hal_init.c

    67	
    68	static u32 rtl871x_open_fw(struct _adapter *adapter, const u8 **mappedfw)
    69	{
    70		if (adapter->fw->size > 200000) {
  > 71			dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
    72				adapter->fw->size);
    73			return 0;
    74		}
    75		*mappedfw = adapter->fw->data;
    76		return adapter->fw->size;
    77	}
    78	

---
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