All of lore.kernel.org
 help / color / mirror / Atom feed
* [jimc:folio-pool-v2-lockdep 21/21] kernel/locking/lockdep_proc.c:300:8: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long'
@ 2026-08-18 11:30 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-18 11:30 UTC (permalink / raw)
  To: Jim Cromie,  Łukasz Bartosik; +Cc: oe-kbuild-all

tree:   https://github.com/jimc/linux.git folio-pool-v2-lockdep
head:   e77ee8289ea0755b0ee299348504d4568f942d71
commit: e77ee8289ea0755b0ee299348504d4568f942d71 [21/21] locking/lockdep: Report bootstrap usage, capacity, and size in /proc/lockdep_stats
config: i386-randconfig-141-20260818 (https://download.01.org/0day-ci/archive/20260818/202608181933.mGdZOb3H-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260818/202608181933.mGdZOb3H-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608181933.mGdZOb3H-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/locking/lockdep_proc.c:300:8: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
     298 |                         seq_printf(m, " lock-classes:                  %11lu [bootstrap: %lu/%lu, %zu kB]\n",
         |                                                                                                   ~~~
         |                                                                                                   %lu
     299 |                                    nr_lock_classes, nr_lock_classes, BOOTSTRAP_LOCK_CLASSES_CAP,
     300 |                                    (BOOTSTRAP_LOCK_CLASSES_CAP * sizeof(struct lock_class)) / 1024);
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/lockdep_proc.c:317:8: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
     315 |                         seq_printf(m, " direct dependencies:           %11lu [bootstrap: %lu/%lu, %zu kB]\n",
         |                                                                                                   ~~~
         |                                                                                                   %lu
     316 |                                    nr_list_entries, nr_list_entries, BOOTSTRAP_LOCKDEP_ENTRIES_CAP,
     317 |                                    (BOOTSTRAP_LOCKDEP_ENTRIES_CAP * sizeof(struct lock_list)) / 1024);
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/lockdep_proc.c:347:8: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
     345 |                         seq_printf(m, " dependency chains:             %11lu [bootstrap: %lu/%lu, %zu kB]\n",
         |                                                                                                   ~~~
         |                                                                                                   %lu
     346 |                                    lock_chain_count(), lock_chain_count(), BOOTSTRAP_LOCK_CHAINS_CAP,
     347 |                                    (BOOTSTRAP_LOCK_CHAINS_CAP * sizeof(struct lock_chain)) / 1024);
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/lockdep_proc.c:362:8: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
     360 |                         seq_printf(m, " dependency chain hlocks used:  %11u [bootstrap: %u/%lu, %zu kB]\n",
         |                                                                                                 ~~~
         |                                                                                                 %lu
     361 |                                    chain_hlocks_used(), chain_hlocks_used(), BOOTSTRAP_CHAIN_HLOCKS_CAP,
     362 |                                    (BOOTSTRAP_CHAIN_HLOCKS_CAP * sizeof(u16)) / 1024);
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/lockdep_proc.c:389:8: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
     387 |                         seq_printf(m, " stack-trace entries:           %11lu [bootstrap: %lu/%lu, %zu kB]\n",
         |                                                                                                   ~~~
         |                                                                                                   %lu
     388 |                                    nr_stack_trace_entries, nr_stack_trace_entries, BOOTSTRAP_STACK_TRACE_CAP,
     389 |                                    (BOOTSTRAP_STACK_TRACE_CAP * sizeof(unsigned long)) / 1024);
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   5 warnings generated.


vim +300 kernel/locking/lockdep_proc.c

   287	
   288		{
   289			unsigned int lc_chunks = 0;
   290			size_t lc_chunk_sz = 0, lc_tail_used = 0;
   291	
   292			lockdep_class_stats(&lc_chunks, &lc_chunk_sz, &lc_tail_used);
   293			if (lc_chunks) {
   294				seq_printf(m, " lock-classes:                  %11lu [dynamic: %u x %zu kB, tail: %zu kB/%zu kB]\n",
   295					   nr_lock_classes, lc_chunks, lc_chunk_sz / 1024,
   296					   lc_tail_used / 1024, lc_chunk_sz / 1024);
   297			} else {
   298				seq_printf(m, " lock-classes:                  %11lu [bootstrap: %lu/%lu, %zu kB]\n",
   299					   nr_lock_classes, nr_lock_classes, BOOTSTRAP_LOCK_CLASSES_CAP,
 > 300					   (BOOTSTRAP_LOCK_CLASSES_CAP * sizeof(struct lock_class)) / 1024);
   301			}
   302		}
   303		seq_printf(m, " dynamic-keys:                  %11lu\n",
   304				nr_dynamic_keys);
   305		{
   306			unsigned int fp_chunks = 0;
   307			size_t fp_chunk_sz = 0, fp_tail_used = 0;
   308	
   309			lockdep_pool_stats(&fp_chunks, &fp_chunk_sz, &fp_tail_used);
   310			if (fp_chunks) {
   311				seq_printf(m, " direct dependencies:           %11lu [dynamic: %u x %zu kB, tail: %zu kB/%zu kB]\n",
   312					   nr_list_entries, fp_chunks, fp_chunk_sz / 1024,
   313					   fp_tail_used / 1024, fp_chunk_sz / 1024);
   314			} else {
   315				seq_printf(m, " direct dependencies:           %11lu [bootstrap: %lu/%lu, %zu kB]\n",
   316					   nr_list_entries, nr_list_entries, BOOTSTRAP_LOCKDEP_ENTRIES_CAP,
   317					   (BOOTSTRAP_LOCKDEP_ENTRIES_CAP * sizeof(struct lock_list)) / 1024);
   318			}
   319		}
   320		seq_printf(m, " indirect dependencies:         %11lu\n",
   321				sum_forward_deps);
   322	
   323		/*
   324		 * Total number of dependencies:
   325		 *
   326		 * All irq-safe locks may nest inside irq-unsafe locks,
   327		 * plus all the other known dependencies:
   328		 */
   329		seq_printf(m, " all direct dependencies:       %11lu\n",
   330				nr_irq_unsafe * nr_irq_safe +
   331				nr_hardirq_unsafe * nr_hardirq_safe +
   332				nr_list_entries);
   333	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-18 11:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 11:30 [jimc:folio-pool-v2-lockdep 21/21] kernel/locking/lockdep_proc.c:300:8: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.