From: kernel test robot <lkp@intel.com>
To: Zhu Lingshan <lingshan.zhu@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [ls-zhu:get_dev_config_submit 5/5] drivers/vdpa/vdpa.c:823:20: sparse: sparse: incorrect type in assignment (different base types)
Date: Tue, 12 Apr 2022 04:24:13 +0800 [thread overview]
Message-ID: <202204120428.0TpzQuA8-lkp@intel.com> (raw)
tree: https://github.com/ls-zhu/linux get_dev_config_submit
head: c4a67f3ac1a9cc5a7bdc0121a9076c67a4f20af9
commit: c4a67f3ac1a9cc5a7bdc0121a9076c67a4f20af9 [5/5] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0
config: m68k-randconfig-s031-20220411 (https://download.01.org/0day-ci/archive/20220412/202204120428.0TpzQuA8-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/ls-zhu/linux/commit/c4a67f3ac1a9cc5a7bdc0121a9076c67a4f20af9
git remote add ls-zhu https://github.com/ls-zhu/linux
git fetch --no-tags ls-zhu get_dev_config_submit
git checkout c4a67f3ac1a9cc5a7bdc0121a9076c67a4f20af9
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash drivers/vdpa/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/vdpa/vdpa.c:823:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] mq @@ got restricted __virtio16 const [usertype] max_virtqueue_pairs @@
drivers/vdpa/vdpa.c:823:20: sparse: expected unsigned short [assigned] [usertype] mq
drivers/vdpa/vdpa.c:823:20: sparse: got restricted __virtio16 const [usertype] max_virtqueue_pairs
drivers/vdpa/vdpa.c:825:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:825:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:825:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:825:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast from restricted __virtio16
drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast from restricted __virtio16
drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast from restricted __virtio16
drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:842:19: sparse: sparse: cast from restricted __virtio16
drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast from restricted __virtio16
drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast from restricted __virtio16
drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast from restricted __virtio16
drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast to restricted __le16
drivers/vdpa/vdpa.c:846:19: sparse: sparse: cast from restricted __virtio16
vim +823 drivers/vdpa/vdpa.c
813
814 static int vdpa_dev_net_mq_config_fill(struct vdpa_device *vdev,
815 struct sk_buff *msg, u64 features,
816 const struct virtio_net_config *config)
817 {
818 u16 val_u16, mq;
819
820 if ((features & BIT_ULL(VIRTIO_NET_F_MQ)) == 0) {
821 mq = 1;
822 } else
> 823 mq = config->max_virtqueue_pairs;
824
825 val_u16 = le16_to_cpu(mq);
826
827 return nla_put_u16(msg, VDPA_ATTR_DEV_NET_CFG_MAX_VQP, val_u16);
828 }
829
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-04-11 20:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202204120428.0TpzQuA8-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=lingshan.zhu@intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®