[chrome-os:chromeos-4.4 13/13] drivers/spi/spi.c:77:37: warning: signed and unsigned type in conditional expression
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: ca018b971e8a0de8ddb9f24e14d458b679bdd135
commit: ca018b971e8a0de8ddb9f24e14d458b679bdd135 [13/13] BACKPORT: spi: Add driver_override SPI device attribute
config: h8300-randconfig-r021-20210212 (attached as .config)
compiler: h8300-linux-gcc (GCC) 7.5.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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.4
git checkout ca018b971e8a0de8ddb9f24e14d458b679bdd135
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/spi/spi.c: In function 'driver_override_store':
>> drivers/spi/spi.c:77:37: warning: signed and unsigned type in conditional expression [-Wsign-compare]
const size_t len = end ? end - buf : count;
^
drivers/spi/spi.c: In function 'spi_register_board_info':
drivers/spi/spi.c:718:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < n; i++, bi++, info++) {
^
drivers/spi/spi.c: In function 'spi_write_then_read':
drivers/spi/spi.c:2774:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((n_tx + n_rx) > SPI_BUFSIZ || !mutex_trylock(&lock)) {
^
vim +77 drivers/spi/spi.c
70
71 static ssize_t driver_override_store(struct device *dev,
72 struct device_attribute *a,
73 const char *buf, size_t count)
74 {
75 struct spi_device *spi = to_spi_device(dev);
76 const char *end = memchr(buf, '\n', count);
> 77 const size_t len = end ? end - buf : count;
78 const char *driver_override, *old;
79
80 /* We need to keep extra room for a newline when displaying value */
81 if (len >= (PAGE_SIZE - 1))
82 return -EINVAL;
83
84 driver_override = kstrndup(buf, len, GFP_KERNEL);
85 if (!driver_override)
86 return -ENOMEM;
87
88 device_lock(dev);
89 old = spi->driver_override;
90 if (len) {
91 spi->driver_override = driver_override;
92 } else {
93 /* Emptry string, disable driver override */
94 spi->driver_override = NULL;
95 kfree(driver_override);
96 }
97 device_unlock(dev);
98 kfree(old);
99
100 return count;
101 }
102
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1055:23: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: 4184da4f316a549ae732d91088571fef46a2f58d staging: vchiq: fix __user annotations
date: 5 months ago
config: sh-randconfig-s032-20210212 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4184da4f316a549ae732d91088571fef46a2f58d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1000:56: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *offset @@ got void [noderef] __user *data @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1000:56: sparse: expected void *offset
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1000:56: sparse: got void [noderef] __user *data
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1214:47: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *[addressable] [assigned] bulk_userdata @@ got void *bulk_userdata @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1214:47: sparse: expected void [noderef] __user *[addressable] [assigned] bulk_userdata
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1214:47: sparse: got void *bulk_userdata
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1051:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1051:23: sparse: expected unsigned int const *__gu_addr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1051:23: sparse: got unsigned int [noderef] [usertype] __user *
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1051:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1051:23: sparse: expected void const volatile [noderef] __user *ptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1051:23: sparse: got unsigned int const *__gu_addr
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1055:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const *__gu_addr @@ got unsigned long [noderef] [usertype] __user * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1055:23: sparse: expected unsigned long const *__gu_addr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1055:23: sparse: got unsigned long [noderef] [usertype] __user *
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1055:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long const *__gu_addr @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1055:23: sparse: expected void const volatile [noderef] __user *ptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1055:23: sparse: got unsigned long const *__gu_addr
vim +1055 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
1042
1043 /* read a user pointer value from an array pointers in user space */
1044 static inline int vchiq_get_user_ptr(void __user **buf, void __user *ubuf, int index)
1045 {
1046 int ret;
1047
1048 if (in_compat_syscall()) {
1049 compat_uptr_t ptr32;
1050 compat_uptr_t __user *uptr = ubuf;
1051 ret = get_user(ptr32, uptr + index);
1052 *buf = compat_ptr(ptr32);
1053 } else {
1054 uintptr_t ptr, __user *uptr = ubuf;
> 1055 ret = get_user(ptr, uptr + index);
1056 *buf = (void __user *)ptr;
1057 }
1058
1059 return ret;
1060 }
1061
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1037:23: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: 5d240a54be7e5921856ce1baa3642351aa118dbc staging: vchiq: convert compat await_completion
date: 5 months ago
config: sh-randconfig-s032-20210212 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5d240a54be7e5921856ce1baa3642351aa118dbc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1062:62: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *uptr @@ got struct vchiq_header *[noderef] __user header @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1062:62: sparse: expected void [noderef] __user *uptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1062:62: sparse: got struct vchiq_header *[noderef] __user header
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1063:62: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *uptr @@ got void *[noderef] __user service_userdata @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1063:62: sparse: expected void [noderef] __user *uptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1063:62: sparse: got void *[noderef] __user service_userdata
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1064:62: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *uptr @@ got void *[noderef] __user bulk_userdata @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1064:62: sparse: expected void [noderef] __user *uptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1064:62: sparse: got void *[noderef] __user bulk_userdata
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1161:58: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *ubuf @@ got void *** @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1161:58: sparse: expected void [noderef] __user *ubuf
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1161:58: sparse: got void ***
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1189:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct vchiq_completion_data [noderef] __user *buf @@ got struct vchiq_completion_data *buf @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1189:46: sparse: expected struct vchiq_completion_data [noderef] __user *buf
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1189:46: sparse: got struct vchiq_completion_data *buf
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1061:45: sparse: sparse: dereference of noderef expression
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1062:59: sparse: sparse: dereference of noderef expression
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1062:59: sparse: sparse: dereference of noderef expression
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1063:59: sparse: sparse: dereference of noderef expression
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1063:59: sparse: sparse: dereference of noderef expression
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1064:59: sparse: sparse: dereference of noderef expression
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1064:59: sparse: sparse: dereference of noderef expression
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1037:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1037:23: sparse: expected unsigned int const *__gu_addr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1037:23: sparse: got unsigned int [noderef] [usertype] __user *
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1037:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1037:23: sparse: expected void const volatile [noderef] __user *ptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1037:23: sparse: got unsigned int const *__gu_addr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __user *const *__gu_addr @@ got void [noderef] __user *[noderef] __user * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: expected void [noderef] __user *const *__gu_addr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: got void [noderef] __user *[noderef] __user *
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got void [noderef] __user *const *__gu_addr @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: expected void const volatile [noderef] __user *ptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: got void [noderef] __user *const *__gu_addr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user **buf @@ got void [noderef] __user * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: expected void [noderef] __user **buf
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1041:23: sparse: got void [noderef] __user *
vim +1037 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
1029
1030 static inline int vchiq_get_user_ptr(void __user **buf, void __user *ubuf, int index)
1031 {
1032 compat_uptr_t ptr32;
1033 int ret;
1034
1035 if (in_compat_syscall()) {
1036 compat_uptr_t __user *uptr = ubuf;
> 1037 ret = get_user(ptr32, &uptr[index]);
1038 *buf = compat_ptr(ptr32);
1039 } else {
1040 void __user *__user *uptr = ubuf;
1041 ret = get_user(buf, &uptr[index]);
1042 }
1043 return ret;
1044 }
1045
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
Hi Luc,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 6 months ago
config: sh-randconfig-s032-20210212 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:44:33: sparse: got unsigned int
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:93:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:94:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:95:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:96:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:97:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:98:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:99:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:100:20: sparse: sparse: Using plain integer as NULL pointer
arch/sh/kernel/cpu/sh2a/clock-sh7264.c:101:20: sparse: sparse: Using plain integer as NULL pointer
--
>> arch/sh/kernel/cpu/sh2a/setup-sh7264.c:474:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh2a/setup-sh7264.c:474:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh2a/setup-sh7264.c:474:9: sparse: got unsigned int
--
fs/gfs2/file.c:306:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user *ptr @@
fs/gfs2/file.c:306:13: sparse: expected unsigned int const *__gu_addr
fs/gfs2/file.c:306:13: sparse: got unsigned int [noderef] [usertype] __user *ptr
>> fs/gfs2/file.c:306:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
fs/gfs2/file.c:306:13: sparse: expected void const volatile [noderef] __user *ptr
fs/gfs2/file.c:306:13: sparse: got unsigned int const *__gu_addr
--
fs/hfsplus/ioctl.c:42:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
fs/hfsplus/ioctl.c:42:50: sparse: expected unsigned int
fs/hfsplus/ioctl.c:42:50: sparse: got restricted __be32 [usertype]
fs/hfsplus/ioctl.c:50:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
fs/hfsplus/ioctl.c:50:50: sparse: expected unsigned int
fs/hfsplus/ioctl.c:50:50: sparse: got restricted __be32 [usertype]
fs/hfsplus/ioctl.c:53:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
fs/hfsplus/ioctl.c:53:50: sparse: expected unsigned int
fs/hfsplus/ioctl.c:53:50: sparse: got restricted __be32 [usertype]
fs/hfsplus/ioctl.c:99:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *user_flags @@
fs/hfsplus/ioctl.c:99:13: sparse: expected int const *__gu_addr
fs/hfsplus/ioctl.c:99:13: sparse: got int [noderef] __user *user_flags
>> fs/hfsplus/ioctl.c:99:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
fs/hfsplus/ioctl.c:99:13: sparse: expected void const volatile [noderef] __user *ptr
fs/hfsplus/ioctl.c:99:13: sparse: got int const *__gu_addr
--
drivers/firewire/core-cdev.c:1088:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] __user * @@
drivers/firewire/core-cdev.c:1088:21: sparse: expected unsigned int const *__gu_addr
drivers/firewire/core-cdev.c:1088:21: sparse: got unsigned int [noderef] __user *
>> drivers/firewire/core-cdev.c:1088:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/firewire/core-cdev.c:1088:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/firewire/core-cdev.c:1088:21: sparse: got unsigned int const *__gu_addr
--
drivers/tee/tee_core.c:683:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] __user * @@
drivers/tee/tee_core.c:683:13: sparse: expected unsigned int const *__gu_addr
drivers/tee/tee_core.c:683:13: sparse: got unsigned int [noderef] __user *
>> drivers/tee/tee_core.c:683:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/tee/tee_core.c:683:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/tee/tee_core.c:683:13: sparse: got unsigned int const *__gu_addr
drivers/tee/tee_core.c:781:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] __user * @@
drivers/tee/tee_core.c:781:13: sparse: expected unsigned int const *__gu_addr
drivers/tee/tee_core.c:781:13: sparse: got unsigned int [noderef] __user *
drivers/tee/tee_core.c:781:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/tee/tee_core.c:781:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/tee/tee_core.c:781:13: sparse: got unsigned int const *__gu_addr
drivers/tee/tee_core.c:782:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] __user * @@
drivers/tee/tee_core.c:782:13: sparse: expected unsigned int const *__gu_addr
drivers/tee/tee_core.c:782:13: sparse: got unsigned int [noderef] __user *
drivers/tee/tee_core.c:782:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/tee/tee_core.c:782:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/tee/tee_core.c:782:13: sparse: got unsigned int const *__gu_addr
--
drivers/net/ppp/ppp_async.c:420:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_async.c:420:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_async.c:420:21: sparse: got int [noderef] __user *p
>> drivers/net/ppp/ppp_async.c:420:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_async.c:420:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_async.c:420:21: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_async.c:435:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/net/ppp/ppp_async.c:435:21: sparse: expected unsigned int const *__gu_addr
drivers/net/ppp/ppp_async.c:435:21: sparse: got unsigned int [noderef] [usertype] __user *
>> drivers/net/ppp/ppp_async.c:435:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/net/ppp/ppp_async.c:435:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_async.c:435:21: sparse: got unsigned int const *__gu_addr
drivers/net/ppp/ppp_async.c:446:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/net/ppp/ppp_async.c:446:21: sparse: expected unsigned int const *__gu_addr
drivers/net/ppp/ppp_async.c:446:21: sparse: got unsigned int [noderef] [usertype] __user *
drivers/net/ppp/ppp_async.c:446:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/net/ppp/ppp_async.c:446:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_async.c:446:21: sparse: got unsigned int const *__gu_addr
drivers/net/ppp/ppp_async.c:471:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_async.c:471:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_async.c:471:21: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_async.c:471:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_async.c:471:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_async.c:471:21: sparse: got int const *__gu_addr
--
drivers/video/fbdev/s3c-fb.c:1024:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/video/fbdev/s3c-fb.c:1024:21: sparse: expected unsigned int const *__gu_addr
drivers/video/fbdev/s3c-fb.c:1024:21: sparse: got unsigned int [noderef] [usertype] __user *
>> drivers/video/fbdev/s3c-fb.c:1024:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/video/fbdev/s3c-fb.c:1024:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/video/fbdev/s3c-fb.c:1024:21: sparse: got unsigned int const *__gu_addr
--
drivers/tty/ipwireless/network.c:174:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *user_arg @@
drivers/tty/ipwireless/network.c:174:21: sparse: expected int const *__gu_addr
drivers/tty/ipwireless/network.c:174:21: sparse: got int [noderef] __user *user_arg
>> drivers/tty/ipwireless/network.c:174:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/tty/ipwireless/network.c:174:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/tty/ipwireless/network.c:174:21: sparse: got int const *__gu_addr
drivers/tty/ipwireless/network.c:188:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *user_arg @@
drivers/tty/ipwireless/network.c:188:21: sparse: expected int const *__gu_addr
drivers/tty/ipwireless/network.c:188:21: sparse: got int [noderef] __user *user_arg
drivers/tty/ipwireless/network.c:188:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/tty/ipwireless/network.c:188:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/tty/ipwireless/network.c:188:21: sparse: got int const *__gu_addr
drivers/tty/ipwireless/network.c:200:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *user_arg @@
drivers/tty/ipwireless/network.c:200:21: sparse: expected int const *__gu_addr
drivers/tty/ipwireless/network.c:200:21: sparse: got int [noderef] __user *user_arg
drivers/tty/ipwireless/network.c:200:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/tty/ipwireless/network.c:200:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/tty/ipwireless/network.c:200:21: sparse: got int const *__gu_addr
drivers/tty/ipwireless/network.c:228:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *user_arg @@
drivers/tty/ipwireless/network.c:228:21: sparse: expected int const *__gu_addr
drivers/tty/ipwireless/network.c:228:21: sparse: got int [noderef] __user *user_arg
drivers/tty/ipwireless/network.c:228:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/tty/ipwireless/network.c:228:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/tty/ipwireless/network.c:228:21: sparse: got int const *__gu_addr
--
net/ipv4/ipmr.c:1568:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/ipv4/ipmr.c:1568:13: sparse: expected int const *__gu_addr
net/ipv4/ipmr.c:1568:13: sparse: got int [noderef] __user *optlen
>> net/ipv4/ipmr.c:1568:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/ipv4/ipmr.c:1568:13: sparse: expected void const volatile [noderef] __user *ptr
net/ipv4/ipmr.c:1568:13: sparse: got int const *__gu_addr
net/ipv4/ipmr.c:2887:13: sparse: sparse: context imbalance in 'ipmr_vif_seq_start' - different lock contexts for basic block
net/ipv4/ipmr.c: note: in included file (through include/linux/mroute.h):
include/linux/mroute_base.h:427:31: sparse: sparse: context imbalance in 'mr_mfc_seq_stop' - unexpected unlock
--
net/llc/af_llc.c:1147:14: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/llc/af_llc.c:1147:14: sparse: expected int const *__gu_addr
net/llc/af_llc.c:1147:14: sparse: got int [noderef] __user *optlen
>> net/llc/af_llc.c:1147:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/llc/af_llc.c:1147:14: sparse: expected void const volatile [noderef] __user *ptr
net/llc/af_llc.c:1147:14: sparse: got int const *__gu_addr
--
net/tls/tls_main.c:341:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/tls/tls_main.c:341:13: sparse: expected int const *__gu_addr
net/tls/tls_main.c:341:13: sparse: got int [noderef] __user *optlen
>> net/tls/tls_main.c:341:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/tls/tls_main.c:341:13: sparse: expected void const volatile [noderef] __user *ptr
net/tls/tls_main.c:341:13: sparse: got int const *__gu_addr
vim +44 arch/sh/kernel/cpu/sh2a/clock-sh7264.c
51ce30684e0d1a Phil Edworthy 2012-05-09 40
51ce30684e0d1a Phil Edworthy 2012-05-09 41 static unsigned long pll_recalc(struct clk *clk)
51ce30684e0d1a Phil Edworthy 2012-05-09 42 {
51ce30684e0d1a Phil Edworthy 2012-05-09 43 unsigned long rate = clk->parent->rate / pll1_div;
51ce30684e0d1a Phil Edworthy 2012-05-09 @44 return rate * pll1rate[(__raw_readw(FRQCR) >> 8) & 1];
51ce30684e0d1a Phil Edworthy 2012-05-09 45 }
51ce30684e0d1a Phil Edworthy 2012-05-09 46
:::::: The code at line 44 was first introduced by commit
:::::: 51ce30684e0d1ae50a154e1026de57d15d096286 sh: Add sh7264 device
:::::: TO: Phil Edworthy <phil.edworthy(a)renesas.com>
:::::: CC: Paul Mundt <lethal(a)linux-sh.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[linux-stable-rc:linux-4.4.y 9520/9999] arch/mips/kernel/crash.c:80:6: error: no previous prototype for 'crash_smp_send_stop'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
head: 95a3867e897abd7811196123f81a119a75aba863
commit: 95f179ffff039f428371133f76dda1384b527fcb [9520/9999] mips/panic: replace smp_send_stop() with kdump friendly version in panic path
config: mips-randconfig-p002-20210209 (attached as .config)
compiler: mips64-linux-gcc (GCC) 7.5.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/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.4.y
git checkout 95f179ffff039f428371133f76dda1384b527fcb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
include/asm-generic/bug.h:151:25: note: in definition of macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
include/linux/cpumask.h:117:2: note: in expansion of macro 'WARN_ON_ONCE'
WARN_ON_ONCE(cpu >= nr_cpumask_bits);
^~~~~~~~~~~~
In file included from arch/mips/kernel/linux32.c:17:0:
include/linux/skbuff.h: In function 'skb_add_data':
include/linux/skbuff.h:2675:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
&csum, from) == copy) {
^~
include/linux/skbuff.h:2679:60: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
} else if (copy_from_iter(skb_put(skb, copy), copy, from) == copy)
^~
include/linux/skbuff.h: In function 'skb_can_coalesce':
include/linux/skbuff.h:2693:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
off == frag->page_offset + skb_frag_size(frag);
^~
include/linux/skbuff.h: In function 'memcpy_from_msg':
include/linux/skbuff.h:2921:51: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return copy_from_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
^~
include/linux/skbuff.h: In function 'memcpy_to_msg':
include/linux/skbuff.h:2926:49: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return copy_to_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
^~
In file included from include/net/inet_frag.h:4:0,
from include/net/netns/ipv4.h:9,
from include/net/net_namespace.h:17,
from include/linux/netdevice.h:43,
from include/net/sch_generic.h:4,
from include/linux/filter.h:16,
from arch/mips/kernel/linux32.c:18:
include/linux/rhashtable.h: In function 'rht_grow_above_75':
include/linux/rhashtable.h:264:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return atomic_read(&ht->nelems) > (tbl->size / 4 * 3) &&
^
include/linux/rhashtable.h: In function 'rht_shrink_below_30':
include/linux/rhashtable.h:277:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return atomic_read(&ht->nelems) < (tbl->size * 3 / 10) &&
^
include/linux/rhashtable.h: In function 'rht_grow_above_100':
include/linux/rhashtable.h:289:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return atomic_read(&ht->nelems) > tbl->size &&
^
include/linux/rhashtable.h: In function 'rht_grow_above_max':
include/linux/rhashtable.h:302:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
atomic_read(&ht->nelems) >= ht->p.insecure_max_entries;
^~
In file included from include/net/sch_generic.h:4:0,
from include/linux/filter.h:16,
from arch/mips/kernel/linux32.c:18:
include/linux/netdevice.h: In function '__skb_gro_checksum_validate_needed':
include/linux/netdevice.h:2389:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
skb_checksum_start_offset(skb) <
^
In file included from arch/mips/include/asm/bug.h:41:0,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/mm.h:8,
from arch/mips/kernel/linux32.c:8:
include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
include/linux/netdevice.h:3027:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
BUG_ON(index >= dev->num_rx_queues);
^
include/asm-generic/bug.h:146:36: note: in definition of macro 'BUG_ON'
#define BUG_ON(condition) do { if (condition) BUG(); } while (0)
^~~~~~~~~
In file included from include/net/sch_generic.h:4:0,
from include/linux/filter.h:16,
from arch/mips/kernel/linux32.c:18:
include/linux/netdevice.h: In function 'netif_msg_init':
include/linux/netdevice.h:3301:37: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
^~
In file included from include/net/rtnetlink.h:5:0,
from include/net/sch_generic.h:12,
from include/linux/filter.h:16,
from arch/mips/kernel/linux32.c:18:
include/net/netlink.h: In function 'nlmsg_ok':
include/net/netlink.h:337:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
nlh->nlmsg_len <= remaining);
^~
include/net/netlink.h: In function 'nlmsg_parse':
include/net/netlink.h:372:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
include/net/netlink.h: In function 'nlmsg_validate':
include/net/netlink.h:405:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
In file included from include/net/sch_generic.h:12:0,
from include/linux/filter.h:16,
from arch/mips/kernel/linux32.c:18:
include/net/rtnetlink.h: In function 'rtnl_msg_family':
include/net/rtnetlink.h:20:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
^~
In file included from arch/mips/kernel/linux32.c:7:0:
include/net/sch_generic.h: In function 'qdisc_cb_private_validate':
>> include/net/sch_generic.h:267:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
BUILD_BUG_ON(sizeof(qcb->data) < sz);
^
include/linux/compiler.h:485:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:505:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~~~~~~~~~~~
include/linux/bug.h:50:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/bug.h:74:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
include/net/sch_generic.h:267:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(qcb->data) < sz);
^~~~~~~~~~~~
In file included from arch/mips/kernel/linux32.c:18:0:
include/linux/filter.h: In function 'bpf_needs_clear_a':
>> include/linux/filter.h:517:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
^~
In file included from arch/mips/kernel/linux32.c:37:0:
include/net/sock.h: In function 'skb_do_copy_data_nocache':
include/net/sock.h:1827:54: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (csum_and_copy_from_iter(to, copy, &csum, from) != copy)
^~
include/net/sock.h:1831:46: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (copy_from_iter_nocache(to, copy, from) != copy)
^~
include/net/sock.h:1833:44: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
} else if (copy_from_iter(to, copy, from) != copy)
^~
arch/mips/kernel/linux32.c: At top level:
arch/mips/kernel/linux32.c:136:20: error: no previous prototype for 'sys32_readahead' [-Werror=missing-prototypes]
asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3,
^~~~~~~~~~~~~~~
arch/mips/kernel/linux32.c:142:17: error: no previous prototype for 'sys32_sync_file_range' [-Werror=missing-prototypes]
asmlinkage long sys32_sync_file_range(int fd, int __pad,
^~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/linux32.c:152:17: error: no previous prototype for 'sys32_fadvise64_64' [-Werror=missing-prototypes]
asmlinkage long sys32_fadvise64_64(int fd, int __pad,
^~~~~~~~~~~~~~~~~~
arch/mips/kernel/linux32.c:162:17: error: no previous prototype for 'sys32_fallocate' [-Werror=missing-prototypes]
asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2,
^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from arch/mips/include/asm/bug.h:41:0,
from include/linux/bug.h:4,
from include/linux/cpumask.h:12,
from include/linux/smp.h:12,
from arch/mips/kernel/crash.c:2:
include/linux/cpumask.h: In function 'cpumask_check':
include/linux/cpumask.h:117:19: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
WARN_ON_ONCE(cpu >= nr_cpumask_bits);
^
include/asm-generic/bug.h:151:25: note: in definition of macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
include/linux/cpumask.h:117:2: note: in expansion of macro 'WARN_ON_ONCE'
WARN_ON_ONCE(cpu >= nr_cpumask_bits);
^~~~~~~~~~~~
arch/mips/kernel/crash.c: At top level:
>> arch/mips/kernel/crash.c:80:6: error: no previous prototype for 'crash_smp_send_stop' [-Werror=missing-prototypes]
void crash_smp_send_stop(void)
^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/crash_smp_send_stop +80 arch/mips/kernel/crash.c
78
79 /* Override the weak function in kernel/panic.c */
> 80 void crash_smp_send_stop(void)
81 {
82 if (_crash_smp_send_stop)
83 _crash_smp_send_stop();
84
85 crash_kexec_prepare_cpus();
86 }
87
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
ld.lld: error: arch/riscv/built-in.a(kernel/entry.o):(.text+0x25C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Andreas Schwab <schwab(a)suse.de>
CC: Palmer Dabbelt <palmerdabbelt(a)google.com>
CC: Tycho Andersen <tycho(a)tycho.pizza>
Hi Andreas,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: cf7b2ae4d70432fa94ebba3fbaab825481ae7189 riscv: return -ENOSYS for syscall -1
date: 5 weeks ago
config: riscv-randconfig-r025-20210212 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout cf7b2ae4d70432fa94ebba3fbaab825481ae7189
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x3E): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x154): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x1152): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x1190): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x11B0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x11CA): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/built-in.a(kernel/entry.o):(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/built-in.a(kernel/entry.o):(.text+0x234): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/built-in.a(kernel/entry.o):(.text+0x246): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: arch/riscv/built-in.a(kernel/entry.o):(.text+0x25C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: signal.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: signal.c:(.fixup+0xC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: fork.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: fork.c:(.fixup+0xC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: fork.c:(.fixup+0x18): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: exit.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: exit.c:(.fixup+0xC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: exit.c:(.fixup+0x18): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[chrome-os:chromeos-4.4 13/13] drivers/spi/spi.c:77:27: warning: operand of changes signedness from 'int' to 'size_t' {aka 'unsigned int'} due to unsignedness of other operand
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: ca018b971e8a0de8ddb9f24e14d458b679bdd135
commit: ca018b971e8a0de8ddb9f24e14d458b679bdd135 [13/13] BACKPORT: spi: Add driver_override SPI device attribute
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.4
git checkout ca018b971e8a0de8ddb9f24e14d458b679bdd135
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arc/include/asm/bug.h:32,
from include/linux/bug.h:4,
from include/linux/debug_locks.h:6,
from include/linux/lockdep.h:23,
from include/linux/spinlock_types.h:18,
from include/linux/mutex.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from drivers/spi/spi.c:19:
include/linux/cpumask.h: In function 'cpumask_check':
include/linux/cpumask.h:117:19: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
117 | WARN_ON_ONCE(cpu >= nr_cpumask_bits);
| ^~
include/asm-generic/bug.h:123:27: note: in definition of macro 'WARN_ON_ONCE'
123 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
drivers/spi/spi.c: In function 'driver_override_store':
>> drivers/spi/spi.c:77:27: warning: operand of ?: changes signedness from 'int' to 'size_t' {aka 'unsigned int'} due to unsignedness of other operand [-Wsign-compare]
77 | const size_t len = end ? end - buf : count;
| ^~~~~~~~~
drivers/spi/spi.c: In function 'spi_register_board_info':
drivers/spi/spi.c:718:16: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
718 | for (i = 0; i < n; i++, bi++, info++) {
| ^
drivers/spi/spi.c: In function 'spi_write_then_read':
drivers/spi/spi.c:2774:20: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
2774 | if ((n_tx + n_rx) > SPI_BUFSIZ || !mutex_trylock(&lock)) {
| ^
In file included from include/linux/perf_event.h:24,
from include/linux/trace_events.h:9,
from include/trace/trace_events.h:19,
from include/trace/define_trace.h:90,
from include/trace/events/spi.h:156,
from drivers/spi/spi.c:42:
At top level:
arch/arc/include/asm/perf_event.h:127:23: warning: 'arc_pmu_cache_map' defined but not used [-Wunused-const-variable=]
127 | static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:95:27: warning: 'arc_pmu_ev_hw_map' defined but not used [-Wunused-const-variable=]
95 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
vim +77 drivers/spi/spi.c
70
71 static ssize_t driver_override_store(struct device *dev,
72 struct device_attribute *a,
73 const char *buf, size_t count)
74 {
75 struct spi_device *spi = to_spi_device(dev);
76 const char *end = memchr(buf, '\n', count);
> 77 const size_t len = end ? end - buf : count;
78 const char *driver_override, *old;
79
80 /* We need to keep extra room for a newline when displaying value */
81 if (len >= (PAGE_SIZE - 1))
82 return -EINVAL;
83
84 driver_override = kstrndup(buf, len, GFP_KERNEL);
85 if (!driver_override)
86 return -ENOMEM;
87
88 device_lock(dev);
89 old = spi->driver_override;
90 if (len) {
91 spi->driver_override = driver_override;
92 } else {
93 /* Emptry string, disable driver override */
94 spi->driver_override = NULL;
95 kfree(driver_override);
96 }
97 device_unlock(dev);
98 kfree(old);
99
100 return count;
101 }
102
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
arch/alpha/lib/csum_partial_copy.c:328:1: error: no previous prototype for 'csum_and_copy_from_user'
by kernel test robot
Hi Al,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: 808b49da54e640cba5c5c92dee658018a529226b alpha: turn csum_partial_copy_from_user() into csum_and_copy_from_user()
date: 9 months ago
config: alpha-randconfig-r031-20210211 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 808b49da54e640cba5c5c92dee658018a529226b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/alpha/lib/csum_partial_copy.c:328:1: error: no previous prototype for 'csum_and_copy_from_user' [-Werror=missing-prototypes]
328 | csum_and_copy_from_user(const void __user *src, void *dst, int len,
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/alpha/lib/csum_partial_copy.c:375:1: error: no previous prototype for 'csum_partial_copy_nocheck' [-Werror=missing-prototypes]
375 | csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/csum_and_copy_from_user +328 arch/alpha/lib/csum_partial_copy.c
326
327 __wsum
> 328 csum_and_copy_from_user(const void __user *src, void *dst, int len,
329 __wsum sum, int *errp)
330 {
331 unsigned long checksum = (__force u32) sum;
332 unsigned long soff = 7 & (unsigned long) src;
333 unsigned long doff = 7 & (unsigned long) dst;
334
335 if (len) {
336 if (!access_ok(src, len)) {
337 if (errp) *errp = -EFAULT;
338 memset(dst, 0, len);
339 return sum;
340 }
341 if (!doff) {
342 if (!soff)
343 checksum = csum_partial_cfu_aligned(
344 (const unsigned long __user *) src,
345 (unsigned long *) dst,
346 len-8, checksum, errp);
347 else
348 checksum = csum_partial_cfu_dest_aligned(
349 (const unsigned long __user *) src,
350 (unsigned long *) dst,
351 soff, len-8, checksum, errp);
352 } else {
353 unsigned long partial_dest;
354 ldq_u(partial_dest, dst);
355 if (!soff)
356 checksum = csum_partial_cfu_src_aligned(
357 (const unsigned long __user *) src,
358 (unsigned long *) dst,
359 doff, len-8, checksum,
360 partial_dest, errp);
361 else
362 checksum = csum_partial_cfu_unaligned(
363 (const unsigned long __user *) src,
364 (unsigned long *) dst,
365 soff, doff, len-8, checksum,
366 partial_dest, errp);
367 }
368 checksum = from64to16 (checksum);
369 }
370 return (__force __wsum)checksum;
371 }
372 EXPORT_SYMBOL(csum_and_copy_from_user);
373
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months