Subject: Re: [PATCH 2/2] netcons: Add udp send fail statistics to netconsole

From: kernel test robot <[email-masked]>
Date: Tue, 27 Aug 2024 17:36:26 +0800

Hi Maksym,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 8af174ea863c72f25ce31cee3baad8a301c0cf0f]

url:    https://github.com/intel-lab-lkp/linux/commits/Maksym-Kutsevol/netcons-Add-udp-send-fail-statistics-to-netconsole/20240826-163850
base:   8af174ea863c72f25ce31cee3baad8a301c0cf0f
patch link:    https://lore.kernel.org/r/20240824215130.2134153-2-max%40kutsevol.com
patch subject: [PATCH 2/2] netcons: Add udp send fail statistics to netconsole
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20240827/[email-masked]/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240827/[email-masked]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All warnings (new ones prefixed by >>):

   drivers/net/netconsole.c: In function 'stats_show':
>> drivers/net/netconsole.c:340:46: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     340 |         return sysfs_emit(buf, "xmit_drop: %lu enomem: %lu\n",
         |                                            ~~^
         |                                              |
         |                                              long unsigned int
         |                                            %u
     341 |                 nt->stats.xmit_drop_count, nt->stats.enomem_count);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~     
         |                          |
         |                          size_t {aka unsigned int}
   drivers/net/netconsole.c:340:58: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     340 |         return sysfs_emit(buf, "xmit_drop: %lu enomem: %lu\n",
         |                                                        ~~^
         |                                                          |
         |                                                          long unsigned int
         |                                                        %u
     341 |                 nt->stats.xmit_drop_count, nt->stats.enomem_count);
         |                                            ~~~~~~~~~~~~~~~~~~~~~~
         |                                                     |
         |                                                     size_t {aka unsigned int}

vim +340 drivers/net/netconsole.c

   335	
   336	static ssize_t stats_show(struct config_item *item, char *buf)
   337	{
   338		struct netconsole_target *nt = to_target(item);
   339	
 > 340		return sysfs_emit(buf, "xmit_drop: %lu enomem: %lu\n",
   341			nt->stats.xmit_drop_count, nt->stats.enomem_count);
   342	}
   343	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki