oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [hare-scsi-devel:tls-netlink.v7 4/20] drivers/nvme/common/keyring.c:44:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'}
@ 2023-03-21 18:23 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-21 18:23 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git tls-netlink.v7
head:   5c13b43fa2c503188a6d668b0dec6a22078329a2
commit: 2f9635844a163239304dbb22b32d38c702246c6e [4/20] nvme-keyring: define a 'psk' keytype
config: m68k-randconfig-r026-20230319 (https://download.01.org/0day-ci/archive/20230322/202303220209.lmYkQp0C-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=2f9635844a163239304dbb22b32d38c702246c6e
        git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
        git fetch --no-tags hare-scsi-devel tls-netlink.v7
        git checkout 2f9635844a163239304dbb22b32d38c702246c6e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/nvme/common/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303220209.lmYkQp0C-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/nvme/common/keyring.c:14:14: warning: no previous prototype for 'nvme_keyring_id' [-Wmissing-prototypes]
      14 | key_serial_t nvme_keyring_id(void)
         |              ^~~~~~~~~~~~~~~
   In file included from include/asm-generic/bug.h:22,
                    from arch/m68k/include/asm/bug.h:32,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from arch/m68k/include/asm/irqflags.h:6,
                    from include/linux/irqflags.h:16,
                    from arch/m68k/include/asm/atomic.h:6,
                    from include/linux/atomic.h:7,
                    from include/linux/mm_types_task.h:13,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from drivers/nvme/common/keyring.c:6:
   drivers/nvme/common/keyring.c: In function 'nvme_tls_psk_match':
>> drivers/nvme/common/keyring.c:44:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      44 |         pr_debug("%s: match '%s' '%s' len %lu\n",
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:345:21: note: in definition of macro 'pr_fmt'
     345 | #define pr_fmt(fmt) fmt
         |                     ^~~
   include/linux/dynamic_debug.h:247:9: note: in expansion of macro '__dynamic_func_call_cls'
     247 |         __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:249:9: note: in expansion of macro '_dynamic_func_call_cls'
     249 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:268:9: note: in expansion of macro '_dynamic_func_call'
     268 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:579:9: note: in expansion of macro 'dynamic_pr_debug'
     579 |         dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~
   drivers/nvme/common/keyring.c:44:9: note: in expansion of macro 'pr_debug'
      44 |         pr_debug("%s: match '%s' '%s' len %lu\n",
         |         ^~~~~~~~
   drivers/nvme/common/keyring.c:44:45: note: format string is defined here
      44 |         pr_debug("%s: match '%s' '%s' len %lu\n",
         |                                           ~~^
         |                                             |
         |                                             long unsigned int
         |                                           %u
   drivers/nvme/common/keyring.c: At top level:
   drivers/nvme/common/keyring.c:69:13: warning: no previous prototype for 'nvme_tls_psk_lookup' [-Wmissing-prototypes]
      69 | struct key *nvme_tls_psk_lookup(key_ref_t keyring,
         |             ^~~~~~~~~~~~~~~~~~~
   drivers/nvme/common/keyring.c:104:5: warning: no previous prototype for 'nvme_keyring_init' [-Wmissing-prototypes]
     104 | int nvme_keyring_init(void)
         |     ^~~~~~~~~~~~~~~~~
   drivers/nvme/common/keyring.c:126:6: warning: no previous prototype for 'nvme_keyring_exit' [-Wmissing-prototypes]
     126 | void nvme_keyring_exit(void)
         |      ^~~~~~~~~~~~~~~~~


vim +44 drivers/nvme/common/keyring.c

    25	
    26	static bool nvme_tls_psk_match(const struct key *key,
    27				       const struct key_match_data *match_data)
    28	{
    29		const char *match_id;
    30		size_t match_len;
    31	
    32		if (!key->description) {
    33			pr_debug("%s: no key description\n", __func__);
    34			return false;
    35		}
    36		match_len = strlen(key->description);
    37		pr_debug("%s: id %s len %zd\n", __func__, key->description, match_len);
    38	
    39		if (!match_data->raw_data) {
    40			pr_debug("%s: no match data\n", __func__);
    41			return false;
    42		}
    43		match_id = match_data->raw_data;
  > 44		pr_debug("%s: match '%s' '%s' len %lu\n",
    45			 __func__, match_id, key->description, match_len);
    46		return !memcmp(key->description, match_id, match_len);
    47	}
    48	

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

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

only message in thread, other threads:[~2023-03-21 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 18:23 [hare-scsi-devel:tls-netlink.v7 4/20] drivers/nvme/common/keyring.c:44:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'} kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).