Re: [PATCH 6/6] Bluetooth: Add MGMT command for controller capabilities
by kernel test robot
Hi Daniel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on next-20200916]
[cannot apply to net-next/master net/master v5.9-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Daniel-Winkler/Bluetooth-Add-new...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-randconfig-s022-20200917 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>)
net/bluetooth/mgmt.c:3647:29: sparse: sparse: restricted __le16 degrades to integer
net/bluetooth/mgmt.c:4104:9: sparse: sparse: cast to restricted __le32
>> net/bluetooth/mgmt.c:4386:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] type @@ got int @@
>> net/bluetooth/mgmt.c:4386:27: sparse: expected restricted __le16 [usertype] type
>> net/bluetooth/mgmt.c:4386:27: sparse: got int
# https://github.com/0day-ci/linux/commit/171d4465b1f2811c76267c2f0acbcd0f7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Winkler/Bluetooth-Add-new-MGMT-interface-for-advertising-add/20200917-042141
git checkout 171d4465b1f2811c76267c2f0acbcd0f77b5e99a
vim +4386 net/bluetooth/mgmt.c
4360
4361 static int read_controller_cap(struct sock *sk, struct hci_dev *hdev,
4362 void *data, u16 len)
4363 {
4364 u8 i = 0;
4365
4366 /* This command will return its data in TVL format. Currently we only
4367 * wish to include LE tx power parameters, so this struct can be given
4368 * a fixed size as data types are not changing.
4369 */
4370 struct {
4371 struct mgmt_tlv entry;
4372 __s8 value;
4373 } __packed cap[2];
4374
4375 BT_DBG("request for %s", hdev->name);
4376 memset(cap, 0, sizeof(cap));
4377
4378 hci_dev_lock(hdev);
4379
4380 /* Append LE tx power bounds */
4381 cap[i].entry.type = MGMT_CAP_LE_TX_PWR_MIN;
4382 cap[i].entry.length = sizeof(__s8);
4383 cap[i].value = hdev->min_le_tx_power;
4384 i++;
4385
> 4386 cap[i].entry.type = MGMT_CAP_LE_TX_PWR_MAX;
4387 cap[i].entry.length = sizeof(__s8);
4388 cap[i].value = hdev->max_le_tx_power;
4389 i++;
4390
4391 hci_dev_unlock(hdev);
4392
4393 return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_READ_CONTROLLER_CAP,
4394 MGMT_STATUS_SUCCESS, cap, sizeof(cap));
4395 }
4396
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[arnd-playground:arm-kill-set_fs-3 23/37] drivers/video/fbdev/sbuslib.c:223:22: error: invalid type argument of '->' (have 'struct fbcmap32')
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git arm-kill-set_fs-3
head: a817d8974430d0e8da637c85535ab678d1b19f59
commit: 5b6b58790d5b05fb66af632da8be955ee8fedb33 [23/37] fbdev: sbuslib: remove compat_alloc_user_space usage
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-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
git checkout 5b6b58790d5b05fb66af632da8be955ee8fedb33
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/video/fbdev/sbuslib.c: In function 'sbusfb_compat_ioctl':
>> drivers/video/fbdev/sbuslib.c:221:26: warning: passing argument 2 of 'copy_from_user' makes pointer from integer without a cast [-Wint-conversion]
221 | if (copy_from_user(&c, arg, sizeof(c)))
| ^~~
| |
| long unsigned int
In file included from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/compat.h:17,
from drivers/video/fbdev/sbuslib.c:7:
include/linux/uaccess.h:179:45: note: expected 'const void *' but argument is of type 'long unsigned int'
179 | copy_from_user(void *to, const void __user *from, unsigned long n)
| ~~~~~~~~~~~~~~~~~~~^~~~
>> drivers/video/fbdev/sbuslib.c:223:22: error: invalid type argument of '->' (have 'struct fbcmap32')
223 | ured = compat_ptr(c->red);
| ^~
drivers/video/fbdev/sbuslib.c:224:24: error: invalid type argument of '->' (have 'struct fbcmap32')
224 | ugreen = compat_ptr(c->green);
| ^~
drivers/video/fbdev/sbuslib.c:225:23: error: invalid type argument of '->' (have 'struct fbcmap32')
225 | ublue = compat_ptr(c->blue);
| ^~
drivers/video/fbdev/sbuslib.c:260:26: warning: passing argument 2 of 'copy_from_user' makes pointer from integer without a cast [-Wint-conversion]
260 | if (copy_from_user(&c, arg, sizeof(c)))
| ^~~
| |
| long unsigned int
In file included from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/compat.h:17,
from drivers/video/fbdev/sbuslib.c:7:
include/linux/uaccess.h:179:45: note: expected 'const void *' but argument is of type 'long unsigned int'
179 | copy_from_user(void *to, const void __user *from, unsigned long n)
| ~~~~~~~~~~~~~~~~~~~^~~~
drivers/video/fbdev/sbuslib.c:263:22: error: invalid type argument of '->' (have 'struct fbcmap32')
263 | ured = compat_ptr(c->red);
| ^~
drivers/video/fbdev/sbuslib.c:264:24: error: invalid type argument of '->' (have 'struct fbcmap32')
264 | ugreen = compat_ptr(c->green);
| ^~
drivers/video/fbdev/sbuslib.c:265:23: error: invalid type argument of '->' (have 'struct fbcmap32')
265 | ublue = compat_ptr(c->blue);
| ^~
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-3
git checkout 5b6b58790d5b05fb66af632da8be955ee8fedb33
vim +223 drivers/video/fbdev/sbuslib.c
193
194 #ifdef CONFIG_COMPAT
195 int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
196 {
197 switch (cmd) {
198 case FBIOGTYPE:
199 case FBIOSATTR:
200 case FBIOGATTR:
201 case FBIOSVIDEO:
202 case FBIOGVIDEO:
203 case FBIOSCURSOR32:
204 case FBIOGCURSOR32: /* This is not implemented yet.
205 Later it should be converted... */
206 case FBIOSCURPOS:
207 case FBIOGCURPOS:
208 case FBIOGCURMAX:
209 return info->fbops->fb_ioctl(info, cmd, arg);
210 case FBIOPUTCMAP32:
211 case FBIOPUTCMAP_SPARC: {
212 struct fbcmap32 c;
213 struct fb_cmap cmap;
214 u16 red, green, blue;
215 u8 red8, green8, blue8;
216 unsigned char __user *ured;
217 unsigned char __user *ugreen;
218 unsigned char __user *ublue;
219 unsigned int i;
220
> 221 if (copy_from_user(&c, arg, sizeof(c)))
222 return -EFAULT;
> 223 ured = compat_ptr(c->red);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[arnd-playground:arm-kill-set_fs-3 27/37] drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1361:7: warning: overflow converting case value to switch condition type (3222820425 to 18446744072637404745)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git arm-kill-set_fs-3
head: a817d8974430d0e8da637c85535ab678d1b19f59
commit: 225a7a4dc1a0bd7d526e5e70b1fcd92368a2eba4 [27/37] v4l2: move v4l2_ext_controls conversion
config: arm64-randconfig-r015-20200916 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1321160a26e7e489baf9b10d6de90a342f898960)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout 225a7a4dc1a0bd7d526e5e70b1fcd92368a2eba4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/media/v4l2-core/v4l2-compat-ioctl32.c:1361:7: warning: overflow converting case value to switch condition type (3222820425 to 18446744072637404745) [-Wswitch]
case VIDIOC_TRY_EXT_CTRLS32: {
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1310:33: note: expanded from macro 'VIDIOC_TRY_EXT_CTRLS32'
#define VIDIOC_TRY_EXT_CTRLS32 _IOWR('V', 73, struct v4l2_ext_controls32)
^
include/uapi/asm-generic/ioctl.h:88:29: note: expanded from macro '_IOWR'
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
^
include/uapi/asm-generic/ioctl.h:70:2: note: expanded from macro '_IOC'
(((dir) << _IOC_DIRSHIFT) | \
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1360:7: warning: overflow converting case value to switch condition type (3222820424 to 18446744072637404744) [-Wswitch]
case VIDIOC_S_EXT_CTRLS32:
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1309:33: note: expanded from macro 'VIDIOC_S_EXT_CTRLS32'
#define VIDIOC_S_EXT_CTRLS32 _IOWR('V', 72, struct v4l2_ext_controls32)
^
include/uapi/asm-generic/ioctl.h:88:29: note: expanded from macro '_IOWR'
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
^
include/uapi/asm-generic/ioctl.h:70:2: note: expanded from macro '_IOC'
(((dir) << _IOC_DIRSHIFT) | \
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1359:7: warning: overflow converting case value to switch condition type (3222820423 to 18446744072637404743) [-Wswitch]
case VIDIOC_G_EXT_CTRLS32:
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1308:33: note: expanded from macro 'VIDIOC_G_EXT_CTRLS32'
#define VIDIOC_G_EXT_CTRLS32 _IOWR('V', 71, struct v4l2_ext_controls32)
^
include/uapi/asm-generic/ioctl.h:88:29: note: expanded from macro '_IOWR'
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
^
include/uapi/asm-generic/ioctl.h:70:2: note: expanded from macro '_IOC'
(((dir) << _IOC_DIRSHIFT) | \
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1400:7: warning: overflow converting case value to switch condition type (3222820425 to 18446744072637404745) [-Wswitch]
case VIDIOC_TRY_EXT_CTRLS32: {
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1310:33: note: expanded from macro 'VIDIOC_TRY_EXT_CTRLS32'
#define VIDIOC_TRY_EXT_CTRLS32 _IOWR('V', 73, struct v4l2_ext_controls32)
^
include/uapi/asm-generic/ioctl.h:88:29: note: expanded from macro '_IOWR'
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
^
include/uapi/asm-generic/ioctl.h:70:2: note: expanded from macro '_IOC'
(((dir) << _IOC_DIRSHIFT) | \
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1399:7: warning: overflow converting case value to switch condition type (3222820424 to 18446744072637404744) [-Wswitch]
case VIDIOC_S_EXT_CTRLS32:
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1309:33: note: expanded from macro 'VIDIOC_S_EXT_CTRLS32'
#define VIDIOC_S_EXT_CTRLS32 _IOWR('V', 72, struct v4l2_ext_controls32)
^
include/uapi/asm-generic/ioctl.h:88:29: note: expanded from macro '_IOWR'
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
^
include/uapi/asm-generic/ioctl.h:70:2: note: expanded from macro '_IOC'
(((dir) << _IOC_DIRSHIFT) | \
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1398:7: warning: overflow converting case value to switch condition type (3222820423 to 18446744072637404743) [-Wswitch]
case VIDIOC_G_EXT_CTRLS32:
^
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1308:33: note: expanded from macro 'VIDIOC_G_EXT_CTRLS32'
#define VIDIOC_G_EXT_CTRLS32 _IOWR('V', 71, struct v4l2_ext_controls32)
^
include/uapi/asm-generic/ioctl.h:88:29: note: expanded from macro '_IOWR'
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
^
include/uapi/asm-generic/ioctl.h:70:2: note: expanded from macro '_IOC'
(((dir) << _IOC_DIRSHIFT) | \
^
6 warnings generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-3
git checkout 225a7a4dc1a0bd7d526e5e70b1fcd92368a2eba4
vim +1361 drivers/media/v4l2-core/v4l2-compat-ioctl32.c
1351
1352 int v4l2_compat_get_array_args(struct file *file,
1353 void *mbuf, void __user *user_ptr,
1354 size_t array_size, int cmd, void *arg)
1355 {
1356 int err = 0;
1357
1358 switch (cmd) {
1359 case VIDIOC_G_EXT_CTRLS32:
1360 case VIDIOC_S_EXT_CTRLS32:
> 1361 case VIDIOC_TRY_EXT_CTRLS32: {
1362 struct v4l2_ext_controls *ecs64 = arg;
1363 struct v4l2_ext_control *ec64 = mbuf;
1364 struct v4l2_ext_control32 __user *ec32 = user_ptr;
1365 int n;
1366
1367 for (n = 0; n < ecs64->count; n++) {
1368 if (copy_from_user(ec64, ec32, sizeof(*ec32)))
1369 return -EFAULT;
1370
1371 if (ctrl_is_pointer(file, ec64->id)) {
1372 compat_uptr_t p;
1373 if (get_user(p, &ec32->string))
1374 return -EFAULT;
1375 ec64->string = compat_ptr(p);
1376 }
1377 ec32++;
1378 ec64++;
1379 }
1380 break;
1381 }
1382 default:
1383 if (copy_from_user(mbuf, user_ptr, array_size))
1384 err = -EFAULT;
1385 break;
1386 }
1387
1388 return err;
1389 }
1390
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[arnd-playground:arm-kill-set_fs-3 15/37] arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git arm-kill-set_fs-3
head: a817d8974430d0e8da637c85535ab678d1b19f59
commit: fa3b547d539dfa4e0ed913549a30d60f4b277d79 [15/37] fixup megaraid_sas
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout fa3b547d539dfa4e0ed913549a30d60f4b277d79
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
In file included from include/linux/uaccess.h:9,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from include/linux/scatterlist.h:8,
from include/linux/dmapool.h:14,
from include/linux/pci.h:1439,
from drivers/scsi/megaraid/megaraid_sas_base.c:22:
drivers/scsi/megaraid/megaraid_sas_base.c: In function 'megasas_compat_iocpacket_get_user':
drivers/scsi/megaraid/megaraid_sas_base.c:8351:31: error: dereferencing pointer to incomplete type 'struct compat_megasas_iocpacket'
8351 | if (get_user(iov_base, &cioc->sgl[i].iov_base) ||
| ^~
arch/x86/include/asm/uaccess.h:115:31: note: in definition of macro '__typefits'
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8351:7: note: in expansion of macro 'get_user'
8351 | if (get_user(iov_base, &cioc->sgl[i].iov_base) ||
| ^~~~~~~~
>> arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:109:2: note: in expansion of macro '__typefits'
109 | __typefits(x,char, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:110:4: note: in expansion of macro '__typefits'
110 | __typefits(x,short, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:111:6: note: in expansion of macro '__typefits'
111 | __typefits(x,int, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:112:8: note: in expansion of macro '__typefits'
112 | __typefits(x,long,0ULL)))))
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8351:7: note: in expansion of macro 'get_user'
8351 | if (get_user(iov_base, &cioc->sgl[i].iov_base) ||
| ^~~~~~~~
>> arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:109:2: note: in expansion of macro '__typefits'
109 | __typefits(x,char, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:110:4: note: in expansion of macro '__typefits'
110 | __typefits(x,short, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:111:6: note: in expansion of macro '__typefits'
111 | __typefits(x,int, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8351:7: note: in expansion of macro 'get_user'
8351 | if (get_user(iov_base, &cioc->sgl[i].iov_base) ||
| ^~~~~~~~
>> arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:109:2: note: in expansion of macro '__typefits'
109 | __typefits(x,char, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:110:4: note: in expansion of macro '__typefits'
110 | __typefits(x,short, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8351:7: note: in expansion of macro 'get_user'
8351 | if (get_user(iov_base, &cioc->sgl[i].iov_base) ||
| ^~~~~~~~
>> arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:109:2: note: in expansion of macro '__typefits'
109 | __typefits(x,char, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8351:7: note: in expansion of macro 'get_user'
8351 | if (get_user(iov_base, &cioc->sgl[i].iov_base) ||
| ^~~~~~~~
>> arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:109:2: note: in expansion of macro '__typefits'
109 | __typefits(x,char, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:110:4: note: in expansion of macro '__typefits'
110 | __typefits(x,short, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:111:6: note: in expansion of macro '__typefits'
111 | __typefits(x,int, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:112:8: note: in expansion of macro '__typefits'
112 | __typefits(x,long,0ULL)))))
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8352:7: note: in expansion of macro 'get_user'
8352 | get_user(ioc->sgl[i].iov_len, &cioc->sgl[i].iov_len)) {
| ^~~~~~~~
>> arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:109:2: note: in expansion of macro '__typefits'
109 | __typefits(x,char, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:110:4: note: in expansion of macro '__typefits'
110 | __typefits(x,short, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:111:6: note: in expansion of macro '__typefits'
111 | __typefits(x,int, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8352:7: note: in expansion of macro 'get_user'
8352 | get_user(ioc->sgl[i].iov_len, &cioc->sgl[i].iov_len)) {
| ^~~~~~~~
>> arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:109:2: note: in expansion of macro '__typefits'
109 | __typefits(x,char, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:110:4: note: in expansion of macro '__typefits'
110 | __typefits(x,short, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8352:7: note: in expansion of macro 'get_user'
8352 | get_user(ioc->sgl[i].iov_len, &cioc->sgl[i].iov_len)) {
| ^~~~~~~~
>> arch/x86/include/asm/uaccess.h:115:2: error: first argument to '__builtin_choose_expr' not a constant
115 | __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:109:2: note: in expansion of macro '__typefits'
109 | __typefits(x,char, \
| ^~~~~~~~~~
arch/x86/include/asm/uaccess.h:151:11: note: in expansion of macro '__inttype'
151 | register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
| ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:8352:7: note: in expansion of macro 'get_user'
8352 | get_user(ioc->sgl[i].iov_len, &cioc->sgl[i].iov_len)) {
| ^~~~~~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-3
git checkout fa3b547d539dfa4e0ed913549a30d60f4b277d79
vim +/__builtin_choose_expr +115 arch/x86/include/asm/uaccess.h
11f1a4b9755f5d arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 103
3578baaed4613a arch/x86/include/asm/uaccess.h H. Peter Anvin 2013-02-12 104 /*
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 105 * This is the smallest unsigned integer type that can fit a value
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 106 * (up to 'long long')
3578baaed4613a arch/x86/include/asm/uaccess.h H. Peter Anvin 2013-02-12 107 */
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 108 #define __inttype(x) __typeof__( \
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 109 __typefits(x,char, \
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 110 __typefits(x,short, \
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 111 __typefits(x,int, \
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 112 __typefits(x,long,0ULL)))))
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 113
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 114 #define __typefits(x,type,not) \
7da63b3d54aa7f arch/x86/include/asm/uaccess.h Linus Torvalds 2020-04-01 @115 __builtin_choose_expr(sizeof(x)<=sizeof(type),(unsigned type)0,not)
865e5b76505cda include/asm-x86/uaccess.h Glauber Costa 2008-06-25 116
:::::: The code at line 115 was first introduced by commit
:::::: 7da63b3d54aa7f1ad4b33a50d88edd623f29fded x86: get rid of 'rtype' argument to __get_user_asm() macro
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[arnd-playground:arm-kill-set_fs-3 19/37] include/linux/compiler_types.h:319:38: error: call to '__compiletime_assert_515' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct compat_ethtool_rxnfc) != sizeof(struct ethtool_rxnfc)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git arm-kill-set_fs-3
head: a817d8974430d0e8da637c85535ab678d1b19f59
commit: 1a4476855604c7e82bb09f066fd8476b43a2e779 [19/37] ethtool: improve compat ioctl handling
config: x86_64-randconfig-s021-20200916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
git checkout 1a4476855604c7e82bb09f066fd8476b43a2e779
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>):
In file included from <command-line>:
In function 'ethtool_translate_compat',
inlined from 'ethtool_rxnfc_copy_to_user' at net/ethtool/ioctl.c:878:6:
>> include/linux/compiler_types.h:319:38: error: call to '__compiletime_assert_515' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct compat_ethtool_rxnfc) != sizeof(struct ethtool_rxnfc)
319 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:300:4: note: in definition of macro '__compiletime_assert'
300 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:319:2: note: in expansion of macro '_compiletime_assert'
319 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
net/ethtool/ioctl.c:819:2: note: in expansion of macro 'BUILD_BUG_ON'
819 | BUILD_BUG_ON(sizeof(struct compat_ethtool_rxnfc) !=
| ^~~~~~~~~~~~
In function 'ethtool_translate_compat',
inlined from 'ethtool_rxnfc_copy_from_user' at net/ethtool/ioctl.c:842:6:
>> include/linux/compiler_types.h:319:38: error: call to '__compiletime_assert_515' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct compat_ethtool_rxnfc) != sizeof(struct ethtool_rxnfc)
319 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:300:4: note: in definition of macro '__compiletime_assert'
300 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:319:2: note: in expansion of macro '_compiletime_assert'
319 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
net/ethtool/ioctl.c:819:2: note: in expansion of macro 'BUILD_BUG_ON'
819 | BUILD_BUG_ON(sizeof(struct compat_ethtool_rxnfc) !=
| ^~~~~~~~~~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-3
git checkout 1a4476855604c7e82bb09f066fd8476b43a2e779
vim +/__compiletime_assert_515 +319 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 305
eb5c2d4b45e3d2 Will Deacon 2020-07-21 306 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 307 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 308
eb5c2d4b45e3d2 Will Deacon 2020-07-21 309 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 310 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 311 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 312 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 313 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 315 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 317 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @319 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 320
:::::: The code at line 319 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[arnd-playground:arm-kill-set_fs-3 16/37] fs/quota/quota.c:202:2: error: unknown type name 'compat_u64'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git arm-kill-set_fs-3
head: a817d8974430d0e8da637c85535ab678d1b19f59
commit: 950e67c3d3bb3ec78dc082d1792e4581874a662d [16/37] quota: merge compat handling back into quotactl
config: powerpc-randconfig-s032-20200916 (attached as .config)
compiler: powerpc64-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.2-201-g24bdaac6-dirty
git checkout 950e67c3d3bb3ec78dc082d1792e4581874a662d
# 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=powerpc
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 >>):
>> fs/quota/quota.c:202:2: error: unknown type name 'compat_u64'
202 | compat_u64 dqb_bhardlimit;
| ^~~~~~~~~~
fs/quota/quota.c:203:2: error: unknown type name 'compat_u64'
203 | compat_u64 dqb_bsoftlimit;
| ^~~~~~~~~~
fs/quota/quota.c:204:2: error: unknown type name 'compat_u64'
204 | compat_u64 dqb_curspace;
| ^~~~~~~~~~
fs/quota/quota.c:205:2: error: unknown type name 'compat_u64'
205 | compat_u64 dqb_ihardlimit;
| ^~~~~~~~~~
fs/quota/quota.c:206:2: error: unknown type name 'compat_u64'
206 | compat_u64 dqb_isoftlimit;
| ^~~~~~~~~~
fs/quota/quota.c:207:2: error: unknown type name 'compat_u64'
207 | compat_u64 dqb_curinodes;
| ^~~~~~~~~~
fs/quota/quota.c:208:2: error: unknown type name 'compat_u64'
208 | compat_u64 dqb_btime;
| ^~~~~~~~~~
fs/quota/quota.c:209:2: error: unknown type name 'compat_u64'
209 | compat_u64 dqb_itime;
| ^~~~~~~~~~
>> fs/quota/quota.c:210:2: error: unknown type name 'compat_uint_t'
210 | compat_uint_t dqb_valid;
| ^~~~~~~~~~~~~
fs/quota/quota.c:422:2: error: unknown type name 'compat_u64'
422 | compat_u64 qfs_ino;
| ^~~~~~~~~~
fs/quota/quota.c:423:2: error: unknown type name 'compat_u64'
423 | compat_u64 qfs_nblks;
| ^~~~~~~~~~
fs/quota/quota.c:424:2: error: unknown type name 'compat_uint_t'
424 | compat_uint_t qfs_nextents;
| ^~~~~~~~~~~~~
fs/quota/quota.c:433:2: error: unknown type name 'compat_uint_t'
433 | compat_uint_t qs_incoredqs;
| ^~~~~~~~~~~~~
>> fs/quota/quota.c:434:2: error: unknown type name 'compat_int_t'
434 | compat_int_t qs_btimelimit;
| ^~~~~~~~~~~~
fs/quota/quota.c:435:2: error: unknown type name 'compat_int_t'
435 | compat_int_t qs_itimelimit;
| ^~~~~~~~~~~~
fs/quota/quota.c:436:2: error: unknown type name 'compat_int_t'
436 | compat_int_t qs_rtbtimelimit;
| ^~~~~~~~~~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-3
git checkout 950e67c3d3bb3ec78dc082d1792e4581874a662d
vim +/compat_u64 +202 fs/quota/quota.c
196
197 /*
198 * This code works only for 32 bit quota tools over 64 bit x86 kernels
199 * and is necessary due to alignment problems.
200 */
201 struct compat_if_dqblk {
> 202 compat_u64 dqb_bhardlimit;
203 compat_u64 dqb_bsoftlimit;
204 compat_u64 dqb_curspace;
205 compat_u64 dqb_ihardlimit;
206 compat_u64 dqb_isoftlimit;
207 compat_u64 dqb_curinodes;
208 compat_u64 dqb_btime;
209 compat_u64 dqb_itime;
> 210 compat_uint_t dqb_valid;
211 };
212
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH leds v1 03/10] leds: lm3697: use struct led_init_data when registering
by kernel test robot
Hi "Marek,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on pavel-linux-leds/for-next]
[also build test WARNING on linus/master v5.9-rc5 next-20200916]
[cannot apply to linux/master j.anaszewski-leds/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Marek-Beh-n/Start-moving-parsing...
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/leds/leds-lm3697.c: In function 'lm3697_probe_dt':
>> drivers/leds/leds-lm3697.c:216:24: warning: variable 'init_data' set but not used [-Wunused-but-set-variable]
216 | struct led_init_data init_data = {};
| ^~~~~~~~~
# https://github.com/0day-ci/linux/commit/7ce949fcd35468fa30bf6e5c0053ffe43...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Marek-Beh-n/Start-moving-parsing-of-linux-default-trigger-to-LED-core-a-cleanup-of-LED-drivers/20200917-071924
git checkout 7ce949fcd35468fa30bf6e5c0053ffe43319496e
vim +/init_data +216 drivers/leds/leds-lm3697.c
192
193 static int lm3697_probe_dt(struct lm3697 *priv)
194 {
195 struct fwnode_handle *child = NULL;
196 struct lm3697_led *led;
197 int control_bank;
198 size_t i = 0;
199 int ret = -EINVAL;
200 int j;
201
202 priv->enable_gpio = devm_gpiod_get_optional(&priv->client->dev,
203 "enable", GPIOD_OUT_LOW);
204 if (IS_ERR(priv->enable_gpio)) {
205 ret = PTR_ERR(priv->enable_gpio);
206 dev_err(&priv->client->dev, "Failed to get enable gpio: %d\n",
207 ret);
208 return ret;
209 }
210
211 priv->regulator = devm_regulator_get(&priv->client->dev, "vled");
212 if (IS_ERR(priv->regulator))
213 priv->regulator = NULL;
214
215 device_for_each_child_node(priv->dev, child) {
> 216 struct led_init_data init_data = {};
217
218 ret = fwnode_property_read_u32(child, "reg", &control_bank);
219 if (ret) {
220 dev_err(&priv->client->dev, "reg property missing\n");
221 fwnode_handle_put(child);
222 goto child_out;
223 }
224
225 if (control_bank > LM3697_CONTROL_B) {
226 dev_err(&priv->client->dev, "reg property is invalid\n");
227 ret = -EINVAL;
228 fwnode_handle_put(child);
229 goto child_out;
230 }
231
232 led = &priv->leds[i];
233
234 ret = ti_lmu_common_get_brt_res(&priv->client->dev,
235 child, &led->lmu_data);
236 if (ret)
237 dev_warn(&priv->client->dev, "brightness resolution property missing\n");
238
239 led->control_bank = control_bank;
240 led->lmu_data.regmap = priv->regmap;
241 led->lmu_data.runtime_ramp_reg = LM3697_CTRL_A_RAMP +
242 control_bank;
243 led->lmu_data.msb_brightness_reg = LM3697_CTRL_A_BRT_MSB +
244 led->control_bank * 2;
245 led->lmu_data.lsb_brightness_reg = LM3697_CTRL_A_BRT_LSB +
246 led->control_bank * 2;
247
248 led->num_leds = fwnode_property_count_u32(child, "led-sources");
249 if (led->num_leds > LM3697_MAX_LED_STRINGS) {
250 dev_err(&priv->client->dev, "Too many LED strings defined\n");
251 continue;
252 }
253
254 ret = fwnode_property_read_u32_array(child, "led-sources",
255 led->hvled_strings,
256 led->num_leds);
257 if (ret) {
258 dev_err(&priv->client->dev, "led-sources property missing\n");
259 fwnode_handle_put(child);
260 goto child_out;
261 }
262
263 for (j = 0; j < led->num_leds; j++)
264 priv->bank_cfg |=
265 (led->control_bank << led->hvled_strings[j]);
266
267 ret = ti_lmu_common_get_ramp_params(&priv->client->dev,
268 child, &led->lmu_data);
269 if (ret)
270 dev_warn(&priv->client->dev, "runtime-ramp properties missing\n");
271
272 init_data.fwnode = child;
273 init_data.devicename = priv->client->name;
274 /* for backwards compatibility if `label` is not present */
275 init_data.default_label = ":";
276
277 led->priv = priv;
278 led->led_dev.max_brightness = led->lmu_data.max_brightness;
279 led->led_dev.brightness_set_blocking = lm3697_brightness_set;
280
281 ret = devm_led_classdev_register(priv->dev, &led->led_dev);
282 if (ret) {
283 dev_err(&priv->client->dev, "led register err: %d\n",
284 ret);
285 fwnode_handle_put(child);
286 goto child_out;
287 }
288
289 i++;
290 }
291
292 child_out:
293 return ret;
294 }
295
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [riscv:for-next 2/7] arch/riscv/kernel/setup.c:74:2: error: implicit declaration of function 'early_ioremap_setup'
by Rong Chen
Hi Atish,
We can reproduce this error if using the reproduce steps:
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 checkout 3d109b0e0949bfd68cc00ffa9d78186fab037bc1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
Best Regards,
Rong Chen
On 8/27/20 6:20 AM, Atish Patra wrote:
> I can't seem to reproduce this issue. I have an older version gcc
> though (8.2). I am surprised by the error as well we are already
> including the early_ioremap.h.
>
> --- a/arch/riscv/include/asm/Kbuild
> +++ b/arch/riscv/include/asm/Kbuild
> @@ -1,4 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0
> +generic-y += early_ioremap.h
> generic-y += extable.h
> generic-y += flat.h
> generic-y += kvm_para.h
>
> On Wed, 2020-08-26 at 09:54 +0800, kernel test robot wrote:
>> tree:
>> https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git for-
>> next
>> head: f75fa0a51b8b544ebd0d03a74c6b04d9f6b95781
>> commit: 3d109b0e0949bfd68cc00ffa9d78186fab037bc1 [2/7] RISC-V: Add
>> early ioremap support
>> config: riscv-allyesconfig (attached as .config)
>> compiler: riscv64-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
>> git checkout 3d109b0e0949bfd68cc00ffa9d78186fab037bc1
>> # save the attached .config to linux build tree
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0
>> 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 >>):
>>
>> arch/riscv/kernel/setup.c: In function 'setup_arch':
>>>> arch/riscv/kernel/setup.c:74:2: error: implicit declaration of
>>>> function 'early_ioremap_setup' [-Werror=implicit-function-
>>>> declaration]
>> 74 | early_ioremap_setup();
>> | ^~~~~~~~~~~~~~~~~~~
>> cc1: some warnings being treated as errors
>>
>> #
>> https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?i...
>> git remote add riscv
>> https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
>> git fetch --no-tags riscv for-next
>> git checkout 3d109b0e0949bfd68cc00ffa9d78186fab037bc1
>> vim +/early_ioremap_setup +74 arch/riscv/kernel/setup.c
>>
>> 63
>> 64 void __init setup_arch(char **cmdline_p)
>> 65 {
>> 66 parse_dtb();
>> 67 init_mm.start_code = (unsigned long) _stext;
>> 68 init_mm.end_code = (unsigned long) _etext;
>> 69 init_mm.end_data = (unsigned long) _edata;
>> 70 init_mm.brk = (unsigned long) _end;
>> 71
>> 72 *cmdline_p = boot_command_line;
>> 73
>> > 74 early_ioremap_setup();
>> 75 parse_early_param();
>> 76
>> 77 setup_bootmem();
>> 78 paging_init();
>> 79 #if IS_ENABLED(CONFIG_BUILTIN_DTB)
>> 80 unflatten_and_copy_device_tree();
>> 81 #else
>> 82 if (early_init_dt_verify(__va(dtb_early_pa)))
>> 83 unflatten_device_tree();
>> 84 else
>> 85 pr_err("No DTB found in kernel
>> mappings\n");
>> 86 #endif
>> 87
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[hch-misc:alloc_vm_area 3/7] ERROR: modpost: "find_vm_area" undefined!
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git alloc_vm_area
head: 19ad9d08553039e79448386da6798ee9578fea25
commit: 9ed11c06e74beb6a7081649530c7fb40e66d5308 [3/7] drm/i915: use vmap in shmem_pin_map
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 9ed11c06e74beb6a7081649530c7fb40e66d5308
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>, old ones prefixed by <<):
>> ERROR: modpost: "find_vm_area" [drivers/gpu/drm/i915/i915.ko] undefined!
--
>> drivers/gpu/drm/vmwgfx/ttm_object.c:60: error: Cannot parse struct or union!
drivers/gpu/drm/vmwgfx/ttm_object.c:98: warning: Function parameter or member 'mem_glob' not described in 'ttm_object_device'
drivers/gpu/drm/vmwgfx/ttm_object.c:98: warning: Function parameter or member 'ops' not described in 'ttm_object_device'
drivers/gpu/drm/vmwgfx/ttm_object.c:98: warning: Function parameter or member 'dmabuf_release' not described in 'ttm_object_device'
drivers/gpu/drm/vmwgfx/ttm_object.c:98: warning: Function parameter or member 'dma_buf_size' not described in 'ttm_object_device'
drivers/gpu/drm/vmwgfx/ttm_object.c:98: warning: Function parameter or member 'idr' not described in 'ttm_object_device'
drivers/gpu/drm/vmwgfx/ttm_object.c:129: warning: Function parameter or member 'rcu_head' not described in 'ttm_ref_object'
drivers/gpu/drm/vmwgfx/ttm_object.c:129: warning: Function parameter or member 'tfile' not described in 'ttm_ref_object'
drivers/gpu/drm/vmwgfx/ttm_object.c:583: warning: Function parameter or member 'dmabuf' not described in 'get_dma_buf_unless_doomed'
drivers/gpu/drm/vmwgfx/ttm_object.c:583: warning: Excess function parameter 'dma_buf' description in 'get_dma_buf_unless_doomed'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years