Hi James,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master linus/master v6.16-rc7 next-20250725]
[cannot apply to bpf-next/net]
[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#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/James-Bottomley/bpf-make-bpf_key-an-opaque-type/20250724-224304
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    
https://lore.kernel.org/r/20250724143428.4416-3-James.Bottomley%40HansenPartnership.com
patch subject: [PATCH 2/3] bpf: remove bpf_key reference
config: i386-randconfig-002-20250725 
(https://download.01.org/0day-ci/archive/20250726/202507262040.o1rzhqvf-...@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250726/202507262040.o1rzhqvf-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202507262040.o1rzhqvf-...@intel.com/

All warnings (new ones prefixed by >>):

   kernel/trace/bpf_trace.c: In function '____bpf_trace_printk':
   kernel/trace/bpf_trace.c:378:9: warning: function '____bpf_trace_printk' 
might be a candidate for 'gnu_printf' format attribute 
[-Wsuggest-attribute=format]
     378 |         ret = bstr_printf(data.buf, MAX_BPRINTF_BUF, fmt, 
data.bin_args);
         |         ^~~
   kernel/trace/bpf_trace.c: In function '____bpf_trace_vprintk':
   kernel/trace/bpf_trace.c:434:9: warning: function '____bpf_trace_vprintk' 
might be a candidate for 'gnu_printf' format attribute 
[-Wsuggest-attribute=format]
     434 |         ret = bstr_printf(data.buf, MAX_BPRINTF_BUF, fmt, 
data.bin_args);
         |         ^~~
   kernel/trace/bpf_trace.c: In function '____bpf_seq_printf':
   kernel/trace/bpf_trace.c:476:9: warning: function '____bpf_seq_printf' might 
be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     476 |         seq_bprintf(m, fmt, data.bin_args);
         |         ^~~~~~~~~~~
   kernel/trace/bpf_trace.c: In function 'bpf_key_put':
>> kernel/trace/bpf_trace.c:1349:37: warning: cast from pointer to integer of 
>> different size [-Wpointer-to-int-cast]
    1349 |         if (system_keyring_id_check((u64)bkey->key) < 0)
         |                                     ^


vim +1349 kernel/trace/bpf_trace.c

  1339  
  1340  /**
  1341   * bpf_key_put - decrement key reference count if key is valid and free 
bpf_key
  1342   * @bkey: bpf_key structure
  1343   *
  1344   * Decrement the reference count of the key inside *bkey*, if the 
pointer
  1345   * is valid, and free *bkey*.
  1346   */
  1347  __bpf_kfunc void bpf_key_put(struct bpf_key *bkey)
  1348  {
> 1349          if (system_keyring_id_check((u64)bkey->key) < 0)
  1350                  key_put(bkey->key);
  1351  
  1352          kfree(bkey);
  1353  }
  1354  

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

Reply via email to