Thread (21 messages) 21 messages, 4 authors, 2024-08-30

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

From: kernel test robot <hidden>
Date: 2024-08-27 09:37:14
Also in: lkml, oe-kbuild-all

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/202408271711.RhzKTDRD-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240827/202408271711.RhzKTDRD-lkp@intel.com/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 [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202408271711.RhzKTDRD-lkp@intel.com/ (local)

All warnings (new ones prefixed by >>):

   drivers/net/netconsole.c: In function 'stats_show':
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help