From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5286498321535863065==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [ti:ti-rt-linux-5.10.y 3381/10213] drivers/rpmsg/virtio_rpmsg_bus.c:893:58: sparse: sparse: incorrect type in argument 2 (different base types) Date: Wed, 08 Dec 2021 02:22:53 +0800 Message-ID: <202112080216.PGAcimTH-lkp@intel.com> List-Id: --===============5286498321535863065== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.= 10.y head: 541ec9a6995c3dd881d6f0b63cc714a08ded457d commit: 7e3ea0d62a4bf0ca04be9bc320d13f564aab0a92 [3381/10213] TEMP: rpmsg: = add a description field config: x86_64-randconfig-s032-20211207 (https://download.01.org/0day-ci/ar= chive/20211208/202112080216.PGAcimTH-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.= git git fetch --no-tags ti ti-rt-linux-5.10.y git checkout 7e3ea0d62a4bf0ca04be9bc320d13f564aab0a92 # save the config file to linux build tree mkdir build_dir make W=3D1 C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3D= build_dir ARCH=3Dx86_64 SHELL=3D/bin/bash drivers/rpmsg/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/rpmsg/virtio_rpmsg_bus.c:893:58: sparse: sparse: incorrect type = in argument 2 (different base types) @@ expected restricted __virtio32 = [usertype] val @@ got unsigned int [usertype] addr @@ drivers/rpmsg/virtio_rpmsg_bus.c:893:58: sparse: expected restricted= __virtio32 [usertype] val drivers/rpmsg/virtio_rpmsg_bus.c:893:58: sparse: got unsigned int [u= sertype] addr >> drivers/rpmsg/virtio_rpmsg_bus.c:894:59: sparse: sparse: incorrect type = in argument 2 (different base types) @@ expected restricted __virtio32 = [usertype] val @@ got unsigned int [usertype] flags @@ drivers/rpmsg/virtio_rpmsg_bus.c:894:59: sparse: expected restricted= __virtio32 [usertype] val drivers/rpmsg/virtio_rpmsg_bus.c:894:59: sparse: got unsigned int [u= sertype] flags vim +893 drivers/rpmsg/virtio_rpmsg_bus.c 887 = 888 if (len =3D=3D sizeof(*msg)) { 889 addr =3D virtio32_to_cpu(vrp->vdev, msg->addr); 890 flags =3D virtio32_to_cpu(vrp->vdev, msg->flags); 891 chinfo.desc[0] =3D '\0'; 892 } else if (len =3D=3D sizeof(*msg_ext)) { > 893 addr =3D virtio32_to_cpu(vrp->vdev, msg_ext->addr); > 894 flags =3D virtio32_to_cpu(vrp->vdev, msg_ext->flags); 895 msg_ext->desc[RPMSG_NAME_SIZE - 1] =3D '\0'; 896 strncpy(chinfo.desc, msg_ext->desc, sizeof(chinfo.desc)); 897 } else { 898 dev_err(dev, "malformed ns msg (%d)\n", len); 899 return -EINVAL; 900 } 901 = 902 /* 903 * the name service ept does _not_ belong to a real rpmsg channel, 904 * and is handled by the rpmsg bus itself. 905 * for sanity reasons, make sure a valid rpdev has _not_ sneaked 906 * in somehow. 907 */ 908 if (rpdev) { 909 dev_err(dev, "anomaly: ns ept has an rpdev handle\n"); 910 return -EINVAL; 911 } 912 = 913 /* don't trust the remote processor for null terminating the name */ 914 msg->name[RPMSG_NAME_SIZE - 1] =3D '\0'; 915 = 916 strncpy(chinfo.name, msg->name, sizeof(chinfo.name)); 917 chinfo.src =3D RPMSG_ADDR_ANY; 918 chinfo.dst =3D addr; 919 = 920 dev_info(dev, "%sing channel %s addr 0x%x\n", 921 flags & RPMSG_NS_DESTROY ? 922 "destroy" : "creat", msg->name, chinfo.dst); 923 = 924 if (flags & RPMSG_NS_DESTROY) { 925 ret =3D rpmsg_unregister_device(&vrp->vdev->dev, &chinfo); 926 if (ret) 927 dev_err(dev, "rpmsg_destroy_channel failed: %d\n", ret); 928 } else { 929 newch =3D rpmsg_create_channel(vrp, &chinfo); 930 if (!newch) 931 dev_err(dev, "rpmsg_create_channel failed\n"); 932 } 933 = 934 return 0; 935 } 936 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5286498321535863065==--