Re: [PATCH v2 3/3] iommu/virtio: Enable x86 support
by kbuild test robot
Hi Jean-Philippe,
I love your patch! Perhaps something to improve:
[auto build test WARNING on iommu/next]
[cannot apply to pci/next linus/master v5.6-rc3 next-20200228]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jean-Philippe-Brucker/virtio-iom...
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-173-ge0787745-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/iommu/virtio-iommu.c:1024:9: sparse: sparse: incompatible types in comparison expression (different base types):
>> drivers/iommu/virtio-iommu.c:1024:9: sparse: restricted __le64 *
>> drivers/iommu/virtio-iommu.c:1024:9: sparse: unsigned long long *
drivers/iommu/virtio-iommu.c:1036:9: sparse: sparse: incompatible types in comparison expression (different base types):
drivers/iommu/virtio-iommu.c:1036:9: sparse: restricted __le64 *
drivers/iommu/virtio-iommu.c:1036:9: sparse: unsigned long long *
drivers/iommu/virtio-iommu.c:1040:9: sparse: sparse: incompatible types in comparison expression (different base types):
drivers/iommu/virtio-iommu.c:1040:9: sparse: restricted __le64 *
drivers/iommu/virtio-iommu.c:1040:9: sparse: unsigned long long *
drivers/iommu/virtio-iommu.c:1044:9: sparse: sparse: incompatible types in comparison expression (different base types):
>> drivers/iommu/virtio-iommu.c:1044:9: sparse: restricted __le32 *
>> drivers/iommu/virtio-iommu.c:1044:9: sparse: unsigned int *
drivers/iommu/virtio-iommu.c:1048:9: sparse: sparse: incompatible types in comparison expression (different base types):
drivers/iommu/virtio-iommu.c:1048:9: sparse: restricted __le32 *
drivers/iommu/virtio-iommu.c:1048:9: sparse: unsigned int *
drivers/iommu/virtio-iommu.c:1052:9: sparse: sparse: incompatible types in comparison expression (different base types):
drivers/iommu/virtio-iommu.c:1052:9: sparse: restricted __le32 *
drivers/iommu/virtio-iommu.c:1052:9: sparse: unsigned int *
vim +1024 drivers/iommu/virtio-iommu.c
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 996
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 997 static int viommu_probe(struct virtio_device *vdev)
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 998 {
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 999 struct device *parent_dev = vdev->dev.parent;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1000 struct viommu_dev *viommu = NULL;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1001 struct device *dev = &vdev->dev;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1002 u64 input_start = 0;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1003 u64 input_end = -1UL;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1004 int ret;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1005
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1006 if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1) ||
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1007 !virtio_has_feature(vdev, VIRTIO_IOMMU_F_MAP_UNMAP))
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1008 return -ENODEV;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1009
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1010 viommu = devm_kzalloc(dev, sizeof(*viommu), GFP_KERNEL);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1011 if (!viommu)
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1012 return -ENOMEM;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1013
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1014 spin_lock_init(&viommu->request_lock);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1015 ida_init(&viommu->domain_ids);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1016 viommu->dev = dev;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1017 viommu->vdev = vdev;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1018 INIT_LIST_HEAD(&viommu->requests);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1019
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1020 ret = viommu_init_vqs(viommu);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1021 if (ret)
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1022 return ret;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1023
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 @1024 virtio_cread(vdev, struct virtio_iommu_config, page_size_mask,
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1025 &viommu->pgsize_bitmap);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1026
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1027 if (!viommu->pgsize_bitmap) {
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1028 ret = -EINVAL;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1029 goto err_free_vqs;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1030 }
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1031
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1032 viommu->map_flags = VIRTIO_IOMMU_MAP_F_READ | VIRTIO_IOMMU_MAP_F_WRITE;
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1033 viommu->last_domain = ~0U;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1034
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1035 /* Optional features */
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1036 virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE,
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1037 struct virtio_iommu_config, input_range.start,
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1038 &input_start);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1039
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1040 virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE,
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1041 struct virtio_iommu_config, input_range.end,
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1042 &input_end);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1043
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 @1044 virtio_cread_feature(vdev, VIRTIO_IOMMU_F_DOMAIN_RANGE,
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1045 struct virtio_iommu_config, domain_range.start,
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1046 &viommu->first_domain);
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1047
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1048 virtio_cread_feature(vdev, VIRTIO_IOMMU_F_DOMAIN_RANGE,
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1049 struct virtio_iommu_config, domain_range.end,
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1050 &viommu->last_domain);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1051
2a5a314874450d Jean-Philippe Brucker 2019-01-15 1052 virtio_cread_feature(vdev, VIRTIO_IOMMU_F_PROBE,
2a5a314874450d Jean-Philippe Brucker 2019-01-15 1053 struct virtio_iommu_config, probe_size,
2a5a314874450d Jean-Philippe Brucker 2019-01-15 1054 &viommu->probe_size);
2a5a314874450d Jean-Philippe Brucker 2019-01-15 1055
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1056 viommu->geometry = (struct iommu_domain_geometry) {
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1057 .aperture_start = input_start,
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1058 .aperture_end = input_end,
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1059 .force_aperture = true,
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1060 };
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1061
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1062 if (virtio_has_feature(vdev, VIRTIO_IOMMU_F_MMIO))
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1063 viommu->map_flags |= VIRTIO_IOMMU_MAP_F_MMIO;
ae24fb49d01103 Jean-Philippe Brucker 2019-07-22 1064
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1065 viommu_ops.pgsize_bitmap = viommu->pgsize_bitmap;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1066
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1067 virtio_device_ready(vdev);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1068
169a126c6e88a9 Jean-Philippe Brucker 2019-01-15 1069 /* Populate the event queue with buffers */
169a126c6e88a9 Jean-Philippe Brucker 2019-01-15 1070 ret = viommu_fill_evtq(viommu);
169a126c6e88a9 Jean-Philippe Brucker 2019-01-15 1071 if (ret)
169a126c6e88a9 Jean-Philippe Brucker 2019-01-15 1072 goto err_free_vqs;
169a126c6e88a9 Jean-Philippe Brucker 2019-01-15 1073
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1074 ret = iommu_device_sysfs_add(&viommu->iommu, dev, NULL, "%s",
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1075 virtio_bus_name(vdev));
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1076 if (ret)
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1077 goto err_free_vqs;
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1078
136495ceb43b56 Jean-Philippe Brucker 2020-02-28 1079 virt_set_iommu_ops(dev->parent, &viommu_ops);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1080 iommu_device_set_ops(&viommu->iommu, &viommu_ops);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1081 iommu_device_set_fwnode(&viommu->iommu, parent_dev->fwnode);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1082
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1083 iommu_device_register(&viommu->iommu);
edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 1084
:::::: The code at line 1024 was first introduced by commit
:::::: edcd69ab9a323b7ac7a86e1c44b6c9c46598391f iommu: Add virtio-iommu driver
:::::: TO: Jean-Philippe Brucker <jean-philippe.brucker(a)arm.com>
:::::: CC: Michael S. Tsirkin <mst(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[peterz-queue:locking/wip-cna 4/4] arch/x86/kernel/alternative.c:742:2: error: implicit declaration of function 'cna_configure_spin_lock_slowpath'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/wip-cna
head: 5a8852a7db378cf49a394512c16d9e0873f8d9a1
commit: 5a8852a7db378cf49a394512c16d9e0873f8d9a1 [4/4] locking/qspinlock: Introduce CNA into the slow path of qspinlock
config: i386-alldefconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
git checkout 5a8852a7db378cf49a394512c16d9e0873f8d9a1
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/kernel/alternative.c: In function 'alternative_instructions':
>> arch/x86/kernel/alternative.c:742:2: error: implicit declaration of function 'cna_configure_spin_lock_slowpath' [-Werror=implicit-function-declaration]
cna_configure_spin_lock_slowpath();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/cna_configure_spin_lock_slowpath +742 arch/x86/kernel/alternative.c
741
> 742 cna_configure_spin_lock_slowpath();
743
744 apply_paravirt(__parainstructions, __parainstructions_end);
745
746 restart_nmi();
747 alternatives_patched = 1;
748 }
749
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[mkp-scsi:queue 116/118] drivers/scsi/ibmvscsi/ibmvfc.c:3644:10: note: in expansion of macro 'NULL'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git queue
head: c892193c1ec595e7f3f599ce817697d9a3d17f81
commit: 54b04c99d02e4c3e442fcb1e77f4ca6515be8826 [116/118] scsi: ibmvfc: Avoid loss of all paths during SVC node reboot
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 54b04c99d02e4c3e442fcb1e77f4ca6515be8826
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/uapi/linux/posix_types.h:5:0,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/list.h:5,
from include/linux/module.h:12,
from drivers/scsi/ibmvscsi/ibmvfc.c:10:
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_tgt_implicit_logout_and_del':
>> include/linux/stddef.h:8:14: warning: 'return' with a value, in function returning void
#define NULL ((void *)0)
^
>> drivers/scsi/ibmvscsi/ibmvfc.c:3644:10: note: in expansion of macro 'NULL'
return NULL;
^~~~
drivers/scsi/ibmvscsi/ibmvfc.c:3638:13: note: declared here
static void ibmvfc_tgt_implicit_logout_and_del(struct ibmvfc_target *tgt)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/uapi/linux/posix_types.h:5:0,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/list.h:5,
from include/linux/module.h:12,
from drivers/scsi//ibmvscsi/ibmvfc.c:10:
drivers/scsi//ibmvscsi/ibmvfc.c: In function 'ibmvfc_tgt_implicit_logout_and_del':
>> include/linux/stddef.h:8:14: warning: 'return' with a value, in function returning void
#define NULL ((void *)0)
^
drivers/scsi//ibmvscsi/ibmvfc.c:3644:10: note: in expansion of macro 'NULL'
return NULL;
^~~~
drivers/scsi//ibmvscsi/ibmvfc.c:3638:13: note: declared here
static void ibmvfc_tgt_implicit_logout_and_del(struct ibmvfc_target *tgt)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/NULL +3644 drivers/scsi/ibmvscsi/ibmvfc.c
3632
3633 /**
3634 * ibmvfc_tgt_implicit_logout_and_del - Initiate an Implicit Logout for specified target
3635 * @tgt: ibmvfc target struct
3636 *
3637 **/
3638 static void ibmvfc_tgt_implicit_logout_and_del(struct ibmvfc_target *tgt)
3639 {
3640 struct ibmvfc_host *vhost = tgt->vhost;
3641 struct ibmvfc_event *evt;
3642
3643 if (vhost->discovery_threads >= disc_threads)
> 3644 return NULL;
3645
3646 vhost->discovery_threads++;
3647 evt = __ibmvfc_tgt_get_implicit_logout_evt(tgt,
3648 ibmvfc_tgt_implicit_logout_and_del_done);
3649
3650 ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_LOGOUT_RPORT_WAIT);
3651 if (ibmvfc_send_event(evt, vhost, default_timeout)) {
3652 vhost->discovery_threads--;
3653 ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_DEL_RPORT);
3654 kref_put(&tgt->kref, ibmvfc_release_tgt);
3655 } else
3656 tgt_dbg(tgt, "Sent Implicit Logout\n");
3657 }
3658
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[peterz-queue:x86/wip-rwx 4/6] arch/s390/kernel/module.c:438:8: error: too few arguments to function 'apply_rela'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip-rwx
head: cba59464a245aa3688f081e8cae797edeff2ea92
commit: 4073a4befd02accef30a0899a01d78882c2ad9e5 [4/6] livepatch: Use text_poke() for relocations
config: s390-debug_defconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 4073a4befd02accef30a0899a01d78882c2ad9e5
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/s390/kernel/module.c: In function 'apply_rela_bits':
arch/s390/kernel/module.c:199:9: warning: passing argument 1 of 'write' makes pointer from integer without a cast [-Wint-conversion]
write(loc, &val, 1);
^~~
arch/s390/kernel/module.c:199:9: note: expected 'void *' but argument is of type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:203:9: warning: passing argument 1 of 'write' makes pointer from integer without a cast [-Wint-conversion]
write(loc, &tmp, 2);
^~~
arch/s390/kernel/module.c:203:9: note: expected 'void *' but argument is of type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:205:9: warning: passing argument 1 of 'write' makes pointer from integer without a cast [-Wint-conversion]
write(loc, &val, 2);
^~~
arch/s390/kernel/module.c:205:9: note: expected 'void *' but argument is of type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:209:9: warning: passing argument 1 of 'write' makes pointer from integer without a cast [-Wint-conversion]
write(loc, &tmp, 4);
^~~
arch/s390/kernel/module.c:209:9: note: expected 'void *' but argument is of type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:211:9: warning: passing argument 1 of 'write' makes pointer from integer without a cast [-Wint-conversion]
write(loc, &val, 4);
^~~
arch/s390/kernel/module.c:211:9: note: expected 'void *' but argument is of type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:213:9: warning: passing argument 1 of 'write' makes pointer from integer without a cast [-Wint-conversion]
write(loc, &val, 8);
^~~
arch/s390/kernel/module.c:213:9: note: expected 'void *' but argument is of type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c: In function '__apply_relocate_add':
>> arch/s390/kernel/module.c:438:8: error: too few arguments to function 'apply_rela'
rc = apply_rela(rela, base, symtab, strtab, me);
^~~~~~~~~~
arch/s390/kernel/module.c:218:12: note: declared here
static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
^~~~~~~~~~
vim +/apply_rela +438 arch/s390/kernel/module.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 418
4073a4befd02ac Peter Zijlstra 2019-10-21 419 static int __apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
^1da177e4c3f41 Linus Torvalds 2005-04-16 420 unsigned int symindex, unsigned int relsec,
4073a4befd02ac Peter Zijlstra 2019-10-21 421 struct module *me,
4073a4befd02ac Peter Zijlstra 2019-10-21 422 void (*write)(void *addr, const void *data, size_t len))
^1da177e4c3f41 Linus Torvalds 2005-04-16 423 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 424 Elf_Addr base;
^1da177e4c3f41 Linus Torvalds 2005-04-16 425 Elf_Sym *symtab;
^1da177e4c3f41 Linus Torvalds 2005-04-16 426 Elf_Rela *rela;
^1da177e4c3f41 Linus Torvalds 2005-04-16 427 unsigned long i, n;
^1da177e4c3f41 Linus Torvalds 2005-04-16 428 int rc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 429
^1da177e4c3f41 Linus Torvalds 2005-04-16 430 DEBUGP("Applying relocate section %u to %u\n",
^1da177e4c3f41 Linus Torvalds 2005-04-16 431 relsec, sechdrs[relsec].sh_info);
^1da177e4c3f41 Linus Torvalds 2005-04-16 432 base = sechdrs[sechdrs[relsec].sh_info].sh_addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 433 symtab = (Elf_Sym *) sechdrs[symindex].sh_addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 434 rela = (Elf_Rela *) sechdrs[relsec].sh_addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 435 n = sechdrs[relsec].sh_size / sizeof(Elf_Rela);
^1da177e4c3f41 Linus Torvalds 2005-04-16 436
^1da177e4c3f41 Linus Torvalds 2005-04-16 437 for (i = 0; i < n; i++, rela++) {
083e14c09b7ae0 Martin Schwidefsky 2013-01-11 @438 rc = apply_rela(rela, base, symtab, strtab, me);
^1da177e4c3f41 Linus Torvalds 2005-04-16 439 if (rc)
^1da177e4c3f41 Linus Torvalds 2005-04-16 440 return rc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 441 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 442 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 443 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 444
:::::: The code at line 438 was first introduced by commit
:::::: 083e14c09b7ae0247b9944a386fdc32cd0719da1 s390/modules: add relocation overflow checking
:::::: TO: Martin Schwidefsky <schwidefsky(a)de.ibm.com>
:::::: CC: Martin Schwidefsky <schwidefsky(a)de.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[sschmidt-wpan-next:master 4/8] net/ipv4/fib_semantics.c:594:31: error: passing argument 6 of 'lwtunnel_build_state' from incompatible pointer type
by kbuild test robot
Hi Alexander,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next.git master
head: ff2dfbe03c56d6b537d26025dc56b900fe6eae12
commit: c0037234c69e275990fbb4e8c006869b53220e84 [4/8] net: add net available in build_state
config: riscv-defconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c0037234c69e275990fbb4e8c006869b53220e84
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/ipv4/fib_semantics.c: In function 'fib_nh_common_init':
net/ipv4/fib_semantics.c:593:30: warning: passing argument 1 of 'lwtunnel_build_state' makes integer from pointer without a cast [-Wint-conversion]
err = lwtunnel_build_state(net, encap_type, encap,
^~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'u16 {aka short unsigned int}' but argument is of type 'struct net *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:593:35: warning: passing argument 2 of 'lwtunnel_build_state' makes pointer from integer without a cast [-Wint-conversion]
err = lwtunnel_build_state(net, encap_type, encap,
^~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct nlattr *' but argument is of type 'u16 {aka short unsigned int}'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:593:47: warning: passing argument 3 of 'lwtunnel_build_state' makes integer from pointer without a cast [-Wint-conversion]
err = lwtunnel_build_state(net, encap_type, encap,
^~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'unsigned int' but argument is of type 'struct nlattr *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:594:9: warning: passing argument 4 of 'lwtunnel_build_state' makes pointer from integer without a cast [-Wint-conversion]
nhc->nhc_family, cfg, &lwtstate,
^~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'const void *' but argument is of type 'u8 {aka unsigned char}'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
>> net/ipv4/fib_semantics.c:594:31: error: passing argument 6 of 'lwtunnel_build_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
nhc->nhc_family, cfg, &lwtstate,
^
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct netlink_ext_ack *' but argument is of type 'struct lwtunnel_state **'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
>> net/ipv4/fib_semantics.c:593:9: error: too many arguments to function 'lwtunnel_build_state'
err = lwtunnel_build_state(net, encap_type, encap,
^~~~~~~~~~~~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: declared here
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c: In function 'fib_encap_match':
net/ipv4/fib_semantics.c:831:29: warning: passing argument 1 of 'lwtunnel_build_state' makes integer from pointer without a cast [-Wint-conversion]
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'u16 {aka short unsigned int}' but argument is of type 'struct net *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:831:34: warning: passing argument 2 of 'lwtunnel_build_state' makes pointer from integer without a cast [-Wint-conversion]
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct nlattr *' but argument is of type 'u16 {aka short unsigned int}'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:831:46: warning: passing argument 3 of 'lwtunnel_build_state' makes integer from pointer without a cast [-Wint-conversion]
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'unsigned int' but argument is of type 'struct nlattr *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:19:0:
include/linux/socket.h:165:18: warning: passing argument 4 of 'lwtunnel_build_state' makes pointer from integer without a cast [-Wint-conversion]
#define AF_INET 2 /* Internet IP Protocol */
^
net/ipv4/fib_semantics.c:831:53: note: in expansion of macro 'AF_INET'
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'const void *' but argument is of type 'int'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:832:8: error: passing argument 5 of 'lwtunnel_build_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
cfg, &lwtstate, extack);
^~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct lwtunnel_state **' but argument is of type 'const struct fib_config *'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:832:13: error: passing argument 6 of 'lwtunnel_build_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
cfg, &lwtstate, extack);
^
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: expected 'struct netlink_ext_ack *' but argument is of type 'struct lwtunnel_state **'
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
net/ipv4/fib_semantics.c:831:8: error: too many arguments to function 'lwtunnel_build_state'
ret = lwtunnel_build_state(net, encap_type, encap, AF_INET,
^~~~~~~~~~~~~~~~~~~~
In file included from net/ipv4/fib_semantics.c:44:0:
include/net/lwtunnel.h:212:19: note: declared here
static inline int lwtunnel_build_state(u16 encap_type,
^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/lwtunnel_build_state +594 net/ipv4/fib_semantics.c
572
573 int fib_nh_common_init(struct net *net, struct fib_nh_common *nhc,
574 struct nlattr *encap, u16 encap_type,
575 void *cfg, gfp_t gfp_flags,
576 struct netlink_ext_ack *extack)
577 {
578 int err;
579
580 nhc->nhc_pcpu_rth_output = alloc_percpu_gfp(struct rtable __rcu *,
581 gfp_flags);
582 if (!nhc->nhc_pcpu_rth_output)
583 return -ENOMEM;
584
585 if (encap) {
586 struct lwtunnel_state *lwtstate;
587
588 if (encap_type == LWTUNNEL_ENCAP_NONE) {
589 NL_SET_ERR_MSG(extack, "LWT encap type not specified");
590 err = -EINVAL;
591 goto lwt_failure;
592 }
> 593 err = lwtunnel_build_state(net, encap_type, encap,
> 594 nhc->nhc_family, cfg, &lwtstate,
595 extack);
596 if (err)
597 goto lwt_failure;
598
599 nhc->nhc_lwtstate = lwtstate_get(lwtstate);
600 }
601
602 return 0;
603
604 lwt_failure:
605 rt_fibinfo_free_cpus(nhc->nhc_pcpu_rth_output);
606 nhc->nhc_pcpu_rth_output = NULL;
607 return err;
608 }
609 EXPORT_SYMBOL_GPL(fib_nh_common_init);
610
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 3/7] kunit: test: create a single centralized executor for all tests
by kbuild test robot
Hi Brendan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on a2f0b878c3ca531a1706cb2a8b079cea3b17bafc]
url: https://github.com/0day-ci/linux/commits/Brendan-Higgins/kunit-create-a-c...
base: a2f0b878c3ca531a1706cb2a8b079cea3b17bafc
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-173-ge0787745-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/ext4/inode-test.c:272:1: sparse: sparse: invalid initializer
vim +272 fs/ext4/inode-test.c
1cbeab1b242d16 Iurii Zaikin 2019-10-17 271
c475c77d5b5639 Alan Maguire 2020-01-06 @272 kunit_test_suites(&ext4_inode_test_suite);
c475c77d5b5639 Alan Maguire 2020-01-06 273
:::::: The code at line 272 was first introduced by commit
:::::: c475c77d5b56398303e726969e81208196b3aab3 kunit: allow kunit tests to be loaded as a module
:::::: TO: Alan Maguire <alan.maguire(a)oracle.com>
:::::: CC: Shuah Khan <skhan(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months