lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[hare-scsi-devel:auth.v15 10/11] drivers/nvme/target/auth.c:491:18: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int')
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git auth.v15
head: 2a3a7d0493841ac5944dc0ba861b53d1c2b28014
commit: 59e3ea5fe9113bf2026d17fc969d69001bc1b746 [10/11] nvmet-auth: Diffie-Hellman key exchange support
config: riscv-randconfig-c006-20220627 (https://download.01.org/0day-ci/archive/20220628/202206281641.MOCcvNmX-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 016342e319fd31e41cf5ed16a6140a8ea2de74dd)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=59e3ea5fe9113bf2026d17fc969d69001bc1b746
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 auth.v15
git checkout 59e3ea5fe9113bf2026d17fc969d69001bc1b746
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/nvme/target/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/nvme/target/auth.c:491:18: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
ctrl->cntlid, ctrl->dh_keysize, buf_size);
^~~~~~~~~~~~~~~~
include/linux/printk.h:528:37: note: expanded from macro 'pr_warn'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:475:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:447:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
error: A dwo section may not contain relocations
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.


vim +491 drivers/nvme/target/auth.c

478
479 int nvmet_auth_ctrl_exponential(struct nvmet_req *req,
480 u8 *buf, int buf_size)
481 {
482 struct nvmet_ctrl *ctrl = req->sq->ctrl;
483 int ret = 0;
484
485 if (!ctrl->dh_key) {
486 pr_warn("ctrl %d no DH public key!\n", ctrl->cntlid);
487 return -ENOKEY;
488 }
489 if (buf_size != ctrl->dh_keysize) {
490 pr_warn("ctrl %d DH public key size mismatch, need %lu is %d\n",
> 491 ctrl->cntlid, ctrl->dh_keysize, buf_size);
492 ret = -EINVAL;
493 } else {
494 memcpy(buf, ctrl->dh_key, buf_size);
495 pr_debug("%s: ctrl %d public key %*ph\n", __func__,
496 ctrl->cntlid, (int)buf_size, buf);
497 }
498
499 return ret;
500 }
501

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-06-28 10:33    [W:0.034 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site