Re: [PATCH v2 3/3] bluetooth: implement read/set default system parameters mgmt
by kernel test robot
Hi Alain,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on next-20200610]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Alain-Michaud/Support-reading-an...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-randconfig-s021-20200607 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-247-gcadbd124-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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_config.c:35:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
>> net/bluetooth/mgmt_config.c:35:17: sparse: expected unsigned short [usertype] value
>> net/bluetooth/mgmt_config.c:35:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:36:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:36:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:36:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:37:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:37:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:37:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:38:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:38:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:38:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:39:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:39:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:39:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:40:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:40:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:40:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:41:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:41:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:41:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:42:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:42:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:42:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:43:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:43:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:43:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:44:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:44:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:44:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:45:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:45:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:45:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:46:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:46:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:46:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:47:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:47:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:47:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:48:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:48:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:48:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:49:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:49:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:49:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:50:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:50:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:50:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:51:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:51:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:51:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:52:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:52:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:52:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:53:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:53:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:53:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:54:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:54:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:54:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:55:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:55:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:55:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:56:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:56:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:56:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:57:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:57:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:57:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:58:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:58:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:58:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:59:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:59:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:59:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:60:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:60:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:60:17: sparse: got restricted __le16 [usertype]
net/bluetooth/mgmt_config.c:61:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned short [usertype] value @@ got restricted __le16 [usertype] @@
net/bluetooth/mgmt_config.c:61:17: sparse: expected unsigned short [usertype] value
net/bluetooth/mgmt_config.c:61:17: sparse: got restricted __le16 [usertype]
>> net/bluetooth/mgmt_config.c:92:34: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:156:34: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:160:52: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:163:51: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:166:54: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:169:51: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:172:50: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:175:53: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:178:45: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:181:50: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:184:52: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:187:52: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:190:53: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:193:53: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:197:60: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:200:50: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:203:48: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:206:53: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:209:56: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:212:55: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:215:58: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:218:57: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:221:60: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:224:53: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:227:56: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:230:54: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:233:54: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:236:49: sparse: sparse: cast to restricted __le16
net/bluetooth/mgmt_config.c:239:49: sparse: sparse: cast to restricted __le16
vim +35 net/bluetooth/mgmt_config.c
19
20 int read_def_system_config(struct sock *sk, struct hci_dev *hdev, void *data,
21 u16 data_len)
22 {
23 struct {
24 struct mgmt_tlv entry;
25 union {
26 /* This is a simplification for now since all values
27 * are 16 bits. In the future, this code may need
28 * refactoring to account for variable length values
29 * and properly calculate the required buffer size.
30 */
31 u16 value;
32 };
33 } __packed params[] = {
34 /* Please see mgmt-api.txt for documentation of these values */
> 35 HDEV_PARAM_U16(0x0000, def_page_scan_type),
36 HDEV_PARAM_U16(0x0001, def_page_scan_int),
37 HDEV_PARAM_U16(0x0002, def_page_scan_window),
38 HDEV_PARAM_U16(0x0003, def_inq_scan_type),
39 HDEV_PARAM_U16(0x0004, def_inq_scan_int),
40 HDEV_PARAM_U16(0x0005, def_inq_scan_window),
41 HDEV_PARAM_U16(0x0006, def_br_lsto),
42 HDEV_PARAM_U16(0x0007, def_page_timeout),
43 HDEV_PARAM_U16(0x0008, sniff_min_interval),
44 HDEV_PARAM_U16(0x0009, sniff_max_interval),
45 HDEV_PARAM_U16(0x000a, le_adv_min_interval),
46 HDEV_PARAM_U16(0x000b, le_adv_max_interval),
47 HDEV_PARAM_U16(0x000c, def_multi_adv_rotation_duration),
48 HDEV_PARAM_U16(0x000d, le_scan_interval),
49 HDEV_PARAM_U16(0x000e, le_scan_window),
50 HDEV_PARAM_U16(0x000f, le_scan_int_suspend),
51 HDEV_PARAM_U16(0x0010, le_scan_window_suspend),
52 HDEV_PARAM_U16(0x0011, le_scan_int_discovery),
53 HDEV_PARAM_U16(0x0012, le_scan_window_discovery),
54 HDEV_PARAM_U16(0x0013, le_scan_int_adv_monitor),
55 HDEV_PARAM_U16(0x0014, le_scan_window_adv_monitor),
56 HDEV_PARAM_U16(0x0015, le_scan_int_connect),
57 HDEV_PARAM_U16(0x0016, le_scan_window_connect),
58 HDEV_PARAM_U16(0x0017, le_conn_min_interval),
> 59 HDEV_PARAM_U16(0x0018, le_conn_max_interval),
60 HDEV_PARAM_U16(0x0019, le_conn_latency),
61 HDEV_PARAM_U16(0x001a, le_supv_timeout),
62 };
63 struct mgmt_rp_read_def_system_config *rp = (void *)params;
64
65 bt_dev_dbg(hdev, "sock %p", sk);
66
67 return mgmt_cmd_complete(sk, hdev->id,
68 MGMT_OP_READ_DEF_SYSTEM_CONFIG,
69 0, rp, sizeof(params));
70 }
71
72 #define TO_TLV(x) ((struct mgmt_tlv *)(x))
73 #define TLV_GET_LE16(tlv) le16_to_cpu(*((u16 *)(TO_TLV(tlv)->value)))
74
75 int set_def_system_config(struct sock *sk, struct hci_dev *hdev, void *data,
76 u16 data_len)
77 {
78 u16 buffer_left = data_len;
79 u8 *buffer = data;
80
81 if (buffer_left < sizeof(struct mgmt_tlv)) {
82 return mgmt_cmd_status(sk, hdev->id,
83 MGMT_OP_SET_DEF_SYSTEM_CONFIG,
84 MGMT_STATUS_INVALID_PARAMS);
85 }
86
87 /* First pass to validate the tlv */
88 while (buffer_left >= sizeof(struct mgmt_tlv)) {
89 const u8 len = TO_TLV(buffer)->length;
90 const u16 exp_len = sizeof(struct mgmt_tlv) +
91 len;
> 92 const u16 type = le16_to_cpu(TO_TLV(buffer)->type);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/usb/gadget/function/rndis.c:1102 rndis_proc_show() warn: inconsistent indenting
by kernel test robot
Hi Masahiro,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 79ca035d2d941839f55f3b8b69f8e81c66946ed8
commit: df8df5e4bc37e39010cfdf5d50cf726fe08aae5b usb: get rid of 'choice' for legacy gadget drivers
date: 3 months ago
config: x86_64-randconfig-m001-20200611 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/usb/gadget/function/rndis.c:1102 rndis_proc_show() warn: inconsistent indenting
drivers/usb/gadget/legacy/raw_gadget.c:273 gadget_bind() error: double unlocked 'dev->lock' (orig line 268)
drivers/usb/gadget/legacy/raw_gadget.c:313 gadget_setup() error: double unlocked 'dev->lock' (orig line 311)
drivers/usb/gadget/legacy/raw_gadget.c:498 raw_ioctl_run() error: double unlocked 'dev->lock' (orig line 481)
drivers/usb/gadget/legacy/raw_gadget.c:632 raw_process_ep0_io() error: double unlocked 'dev->lock' (orig line 606)
drivers/usb/gadget/legacy/raw_gadget.c:832 raw_ioctl_ep_disable() error: double unlocked 'dev->lock' (orig line 819)
drivers/usb/gadget/legacy/raw_gadget.c:926 raw_process_ep_io() error: double unlocked 'dev->lock' (orig line 900)
Old smatch warnings:
drivers/usb/gadget/function/rndis.c:1109 rndis_proc_show() warn: inconsistent indenting
drivers/usb/gadget/legacy/raw_gadget.c:102 raw_event_queue_fetch() warn: inconsistent returns 'queue->sema'.
drivers/usb/gadget/legacy/raw_gadget.c:397 raw_ioctl_init() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/usb/gadget/legacy/raw_gadget.c:512 raw_ioctl_event_fetch() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/usb/gadget/legacy/raw_gadget.c:535 raw_ioctl_event_fetch() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/usb/gadget/legacy/raw_gadget.c:546 raw_alloc_io_data() error: passing non negative 8 to ERR_PTR
drivers/usb/gadget/legacy/raw_gadget.c:668 raw_ioctl_ep0_read() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/usb/gadget/legacy/raw_gadget.c:962 raw_ioctl_ep_read() warn: maybe return -EFAULT instead of the bytes remaining?
vim +1102 drivers/usb/gadget/function/rndis.c
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1086
e184d5fcaac9676 drivers/usb/gadget/rndis.c Alexey Dobriyan 2008-05-14 1087 static int rndis_proc_show(struct seq_file *m, void *v)
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1088 {
e184d5fcaac9676 drivers/usb/gadget/rndis.c Alexey Dobriyan 2008-05-14 1089 rndis_params *param = m->private;
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1090
e184d5fcaac9676 drivers/usb/gadget/rndis.c Alexey Dobriyan 2008-05-14 1091 seq_printf(m,
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1092 "Config Nr. %d\n"
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1093 "used : %s\n"
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1094 "state : %s\n"
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1095 "medium : 0x%08X\n"
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1096 "speed : %d\n"
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1097 "cable : %s\n"
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1098 "vendor ID : 0x%08X\n"
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1099 "vendor : %s\n",
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1100 param->confignr, (param->used) ? "y" : "n",
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1101 ({ char *s = "?";
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 @1102 switch (param->state) {
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1103 case RNDIS_UNINITIALIZED:
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1104 s = "RNDIS_UNINITIALIZED"; break;
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1105 case RNDIS_INITIALIZED:
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1106 s = "RNDIS_INITIALIZED"; break;
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1107 case RNDIS_DATA_INITIALIZED:
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1108 s = "RNDIS_DATA_INITIALIZED"; break;
2b84f92b8141679 drivers/usb/gadget/rndis.c Joe Perches 2013-10-08 1109 } s; }),
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1110 param->medium,
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1111 (param->media_state) ? 0 : param->speed*100,
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1112 (param->media_state) ? "disconnected" : "connected",
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1113 param->vendorID, param->vendorDescr);
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1114 return 0;
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1115 }
^1da177e4c3f415 drivers/usb/gadget/rndis.c Linus Torvalds 2005-04-16 1116
:::::: The code at line 1102 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 24/41] powerpc/book3s64/pkeys: Store/restore userspace AMR correctly on entry and exit from kernel
by kernel test robot
Hi "Aneesh,
I love your patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on next-20200610]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Aneesh-Kumar-K-V/Kernel-userspac...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-randconfig-r006-20200608 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>, old ones prefixed by <<):
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
In file included from arch/powerpc/include/asm/kup.h:18:
>> arch/powerpc/include/asm/book3s/64/kup.h:142:24: error: no member named 'kuap' in 'struct pt_regs'
mtspr(SPRN_AMR, regs->kuap);
~~~~ ^
arch/powerpc/include/asm/reg.h:1386:33: note: expanded from macro 'mtspr'
: "r" ((unsigned long)(v)) ^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
In file included from arch/powerpc/include/asm/kup.h:18:
arch/powerpc/include/asm/book3s/64/kup.h:155:22: error: no member named 'kuap' in 'struct pt_regs'
if (unlikely(regs->kuap != amr)) {
~~~~ ^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
In file included from arch/powerpc/include/asm/kup.h:18:
arch/powerpc/include/asm/book3s/64/kup.h:157:26: error: no member named 'kuap' in 'struct pt_regs'
mtspr(SPRN_AMR, regs->kuap);
~~~~ ^
arch/powerpc/include/asm/reg.h:1386:33: note: expanded from macro 'mtspr'
: "r" ((unsigned long)(v)) ^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
In file included from arch/powerpc/include/asm/kup.h:18:
arch/powerpc/include/asm/book3s/64/kup.h:251:14: error: no member named 'kuap' in 'struct pt_regs'
(regs->kuap & (is_write ? AMR_KUAP_BLOCK_WRITE : AMR_KUAP_BLOCK_READ)),
~~~~ ^
include/asm-generic/bug.h:122:25: note: expanded from macro 'WARN'
int __ret_warn_on = !!(condition); ^~~~~~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
>> arch/powerpc/include/asm/kup.h:56:20: error: redefinition of 'allow_user_access'
static inline void allow_user_access(void __user *to, const void __user *from,
^
arch/powerpc/include/asm/book3s/64/kup.h:212:29: note: previous definition is here
static __always_inline void allow_user_access(void __user *to, const void __user *from,
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
>> arch/powerpc/include/asm/kup.h:58:20: error: redefinition of 'prevent_user_access'
static inline void prevent_user_access(void __user *to, const void __user *from,
^
arch/powerpc/include/asm/book3s/64/kup.h:227:20: note: previous definition is here
static inline void prevent_user_access(void __user *to, const void __user *from,
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
>> arch/powerpc/include/asm/kup.h:60:29: error: redefinition of 'prevent_user_access_return'
static inline unsigned long prevent_user_access_return(void) { return 0UL; }
^
arch/powerpc/include/asm/book3s/64/kup.h:233:29: note: previous definition is here
static inline unsigned long prevent_user_access_return(void)
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
>> arch/powerpc/include/asm/kup.h:61:20: error: redefinition of 'restore_user_access'
static inline void restore_user_access(unsigned long flags) { }
^
arch/powerpc/include/asm/book3s/64/kup.h:242:20: note: previous definition is here
static inline void restore_user_access(unsigned long flags)
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:21:
In file included from include/linux/uaccess.h:11:
In file included from arch/powerpc/include/asm/uaccess.h:9:
>> arch/powerpc/include/asm/kup.h:63:1: error: redefinition of 'bad_kuap_fault'
bad_kuap_fault(struct pt_regs *regs, unsigned long address, bool is_write)
^
arch/powerpc/include/asm/book3s/64/kup.h:248:1: note: previous definition is here
bad_kuap_fault(struct pt_regs *regs, unsigned long address, bool is_write)
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:34:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:87:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:34:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:87:25: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:34:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:88:4: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
set->sig[1] | set->sig[0]) == 0;
^ ~
arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:34:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:90:11: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
return (set->sig[1] | set->sig[0]) == 0;
^ ~
arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:34:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:103:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
return (set1->sig[3] == set2->sig[3]) &&
^ ~
arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:34:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:103:27: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
return (set1->sig[3] == set2->sig[3]) &&
^ ~
arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:34:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:104:5: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
(set1->sig[2] == set2->sig[2]) &&
^ ~
arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:34:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:104:21: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
(set1->sig[2] == set2->sig[2]) &&
^ ~
arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
vim +142 arch/powerpc/include/asm/book3s/64/kup.h
135
136 static inline void kuap_restore_user_amr(struct pt_regs *regs)
137 {
138 if (!mmu_has_feature(MMU_FTR_PKEY))
139 return;
140
141 isync();
> 142 mtspr(SPRN_AMR, regs->kuap);
143 /*
144 * No isync required here because we are about to rfi
145 * back to previous context before any user accesses
146 * would be made, which is a CSI.
147 */
148 }
149
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] Makefile: Improve compressed debug info support detection
by Nick Desaulniers
On Wed, Jun 10, 2020 at 12:11 PM Arvind Sankar <nivedita(a)alum.mit.edu> wrote:
>
> Commit
> 10e68b02c861 ("Makefile: support compressed debug info")
> added support for compressed debug sections.
>
> Support is detected by checking
> - does the compiler support -gz=zlib
> - does the assembler support --compressed-debug-sections=zlib
> - does the linker support --compressed-debug-sections=zlib
>
> However, the gcc driver's support for this option is somewhat
> convoluted. The driver's builtin specs are set based on the version of
> binutils that it was configured with, and it reports an error only if
> the assembler (or linker) is actually invoked.
>
> The cc-option check in scripts/Kconfig.include does not invoke the
> assembler, so the gcc driver reports success even if it does not support
> the option being passed to the assembler.
Thanks for the patch! In that case, should we consider dropping the
cc-option check from the Kconfg then, too?
It seems it would help for clang-4 and older, since they do error
about the unknown option, but I'm not too worried about trying to
support that version of Clang with this config.
> Combined with an installed
> version of binutils that is more recent than the one the compiler was
> built with, it is possible for all three tests to succeed, yet an actual
> compilation with -gz=zlib to fail.
It kind of sounds like the assembler must be invoked to verify this
will work for the cflags then?
>
> Moreover, it is unnecessary to explicitly pass
> --compressed-debug-sections=zlib to the assembler via -Wa, since the
> driver will do that automatically.
>
> Convert the as-option to just -gz=zlib, simplifying it as well as
> performing a better test of the gcc driver's capabilities.
>
> Reported-by: kernel test robot <lkp(a)intel.com>
> Signed-off-by: Arvind Sankar <nivedita(a)alum.mit.edu>
Does this imply all feature tests of as-option with -W(comma)... are
broken? IIUC, then the assembler is still not invoked, much as in
this case? (as in they all pass when maybe they should not?) (or
based on below, maybe just the Kconfig from 74afda4016a74 in
arch/arm64/Kconfig, AS_HAS_PAC)
In the other thread, you discussed -c vs -s. It looks like -c is used
for as-option, so I expect the assembler to be invoked.
Maybe we should look at the mismatch between Kbuild and Kconfig
regarding -c vs -s in scripts/Kbuild.include vs
scripts/Kconfig.include? Otherwise it sounds like cc-option cannot be
used to check for `-Wa,` flags in Kconfig, since if the assembler is
never invoked, it may appear that GCC has support for
-Wa,--compress-debug-sections=zlib when it indeed does not.
> ---
> Makefile | 2 +-
> lib/Kconfig.debug | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 839f9fee22cb..cb29e56f227a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -842,7 +842,7 @@ endif
>
> ifdef CONFIG_DEBUG_INFO_COMPRESSED
> DEBUG_CFLAGS += -gz=zlib
> -KBUILD_AFLAGS += -Wa,--compress-debug-sections=zlib
> +KBUILD_AFLAGS += -gz=zlib
> KBUILD_LDFLAGS += --compress-debug-sections=zlib
> endif
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index cb98741601bd..94ce36be470c 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -229,7 +229,7 @@ config DEBUG_INFO_COMPRESSED
> bool "Compressed debugging information"
> depends on DEBUG_INFO
> depends on $(cc-option,-gz=zlib)
> - depends on $(as-option,-Wa$(comma)--compress-debug-sections=zlib)
> + depends on $(as-option,-gz=zlib)
> depends on $(ld-option,--compress-debug-sections=zlib)
> help
> Compress the debug information using zlib. Requires GCC 5.0+ or Clang
> --
> 2.26.2
>
--
Thanks,
~Nick Desaulniers
2 years, 3 months
arch/powerpc/mm/pgtable.c:267:15: error: implicit declaration of function 'pmd_ptr'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 84fc461db99b2dc19e019c0a97725a3653687981
commit: e05c7b1f2bc4b7b28199b9a7572f73436d97317e mm: pgtable: add shortcuts for accessing kernel PMD and PTE
date: 29 hours ago
config: powerpc64-randconfig-r022-20200610 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
git checkout e05c7b1f2bc4b7b28199b9a7572f73436d97317e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 <<):
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:105:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:107:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:109:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:111:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:113:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:115:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> arch/powerpc/mm/pgtable.c:267:15: error: implicit declaration of function 'pmd_ptr' [-Werror,-Wimplicit-function-declaration]
pmd_t *pmd = pmd_ptr(mm, addr);
^
>> arch/powerpc/mm/pgtable.c:267:9: error: incompatible integer to pointer conversion initializing 'pmd_t *' with an expression of type 'int' [-Werror,-Wint-conversion]
pmd_t *pmd = pmd_ptr(mm, addr);
^ ~~~~~~~~~~~~~~~~~
arch/powerpc/mm/pgtable.c:341:8: error: no previous prototype for function '__find_linux_pte' [-Werror,-Wmissing-prototypes]
pte_t *__find_linux_pte(pgd_t *pgdir, unsigned long ea,
^
arch/powerpc/mm/pgtable.c:341:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
pte_t *__find_linux_pte(pgd_t *pgdir, unsigned long ea,
^
static
9 errors generated.
vim +/pmd_ptr +267 arch/powerpc/mm/pgtable.c
b12c07a4bb064c Christophe Leroy 2020-05-19 263
b12c07a4bb064c Christophe Leroy 2020-05-19 264 #if defined(CONFIG_PPC_8xx)
b12c07a4bb064c Christophe Leroy 2020-05-19 265 void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
b12c07a4bb064c Christophe Leroy 2020-05-19 266 {
b250c8c08c79d1 Christophe Leroy 2020-05-19 @267 pmd_t *pmd = pmd_ptr(mm, addr);
b250c8c08c79d1 Christophe Leroy 2020-05-19 268 pte_basic_t val;
b250c8c08c79d1 Christophe Leroy 2020-05-19 269 pte_basic_t *entry = &ptep->pte;
b250c8c08c79d1 Christophe Leroy 2020-05-19 270 int num = is_hugepd(*((hugepd_t *)pmd)) ? 1 : SZ_512K / SZ_4K;
b250c8c08c79d1 Christophe Leroy 2020-05-19 271 int i;
b250c8c08c79d1 Christophe Leroy 2020-05-19 272
b12c07a4bb064c Christophe Leroy 2020-05-19 273 /*
b12c07a4bb064c Christophe Leroy 2020-05-19 274 * Make sure hardware valid bit is not set. We don't do
b12c07a4bb064c Christophe Leroy 2020-05-19 275 * tlb flush for this update.
b12c07a4bb064c Christophe Leroy 2020-05-19 276 */
b12c07a4bb064c Christophe Leroy 2020-05-19 277 VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep));
b12c07a4bb064c Christophe Leroy 2020-05-19 278
b12c07a4bb064c Christophe Leroy 2020-05-19 279 pte = pte_mkpte(pte);
b12c07a4bb064c Christophe Leroy 2020-05-19 280
b12c07a4bb064c Christophe Leroy 2020-05-19 281 pte = set_pte_filter(pte);
b12c07a4bb064c Christophe Leroy 2020-05-19 282
b250c8c08c79d1 Christophe Leroy 2020-05-19 283 val = pte_val(pte);
b250c8c08c79d1 Christophe Leroy 2020-05-19 284 for (i = 0; i < num; i++, entry++, val += SZ_4K)
b250c8c08c79d1 Christophe Leroy 2020-05-19 285 *entry = val;
b12c07a4bb064c Christophe Leroy 2020-05-19 286 }
b12c07a4bb064c Christophe Leroy 2020-05-19 287 #endif
f069ff396d657a Aneesh Kumar K.V 2018-05-29 288 #endif /* CONFIG_HUGETLB_PAGE */
f069ff396d657a Aneesh Kumar K.V 2018-05-29 289
:::::: The code at line 267 was first introduced by commit
:::::: b250c8c08c79d1eb5354c7eaa84b7505f5f2d921 powerpc/8xx: Manage 512k huge pages as standard pages.
:::::: TO: Christophe Leroy <christophe.leroy(a)csgroup.eu>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[thierryreding:for-5.9/dt-bindings 60/60] drivers/gpu/host1x/dev.c:471:3: error: label 'deinit_debugfs' used but not defined
by kernel test robot
tree: https://github.com/thierryreding/linux for-5.9/dt-bindings
head: 530e646a84b3159927f2664eb68369ab5173191e
commit: 530e646a84b3159927f2664eb68369ab5173191e [60/60] WIP
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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 530e646a84b3159927f2664eb68369ab5173191e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 <<):
drivers/gpu/host1x/dev.c: In function 'host1x_probe':
drivers/gpu/host1x/dev.c:481:1: warning: label 'deinit_intr' defined but not used [-Wunused-label]
481 | deinit_intr:
| ^~~~~~~~~~~
>> drivers/gpu/host1x/dev.c:471:3: error: label 'deinit_debugfs' used but not defined
471 | goto deinit_debugfs;
| ^~~~
vim +/deinit_debugfs +471 drivers/gpu/host1x/dev.c
06867a362de08ff Thierry Reding 2019-10-28 343
754716874389ccb Terje Bergstrom 2013-03-22 344 static int host1x_probe(struct platform_device *pdev)
754716874389ccb Terje Bergstrom 2013-03-22 345 {
754716874389ccb Terje Bergstrom 2013-03-22 346 struct host1x *host;
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 347 struct resource *regs, *hv_regs = NULL;
754716874389ccb Terje Bergstrom 2013-03-22 348 int syncpt_irq;
754716874389ccb Terje Bergstrom 2013-03-22 349 int err;
754716874389ccb Terje Bergstrom 2013-03-22 350
6a341fdff16e13e Thierry Reding 2017-08-21 351 host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
6a341fdff16e13e Thierry Reding 2017-08-21 352 if (!host)
6a341fdff16e13e Thierry Reding 2017-08-21 353 return -ENOMEM;
6a341fdff16e13e Thierry Reding 2017-08-21 354
6a341fdff16e13e Thierry Reding 2017-08-21 355 host->info = of_device_get_match_data(&pdev->dev);
754716874389ccb Terje Bergstrom 2013-03-22 356
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 357 if (host->info->has_hypervisor) {
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 358 regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vm");
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 359 if (!regs) {
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 360 dev_err(&pdev->dev, "failed to get vm registers\n");
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 361 return -ENXIO;
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 362 }
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 363
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 364 hv_regs = platform_get_resource_byname(pdev, IORESOURCE_MEM,
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 365 "hypervisor");
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 366 if (!hv_regs) {
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 367 dev_err(&pdev->dev,
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 368 "failed to get hypervisor registers\n");
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 369 return -ENXIO;
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 370 }
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 371 } else {
754716874389ccb Terje Bergstrom 2013-03-22 372 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
754716874389ccb Terje Bergstrom 2013-03-22 373 if (!regs) {
754716874389ccb Terje Bergstrom 2013-03-22 374 dev_err(&pdev->dev, "failed to get registers\n");
754716874389ccb Terje Bergstrom 2013-03-22 375 return -ENXIO;
754716874389ccb Terje Bergstrom 2013-03-22 376 }
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 377 }
754716874389ccb Terje Bergstrom 2013-03-22 378
754716874389ccb Terje Bergstrom 2013-03-22 379 syncpt_irq = platform_get_irq(pdev, 0);
033ccdb7f6b1170 YueHaibing 2019-11-02 380 if (syncpt_irq < 0)
7b2c63de20080c1 Gustavo A. R. Silva 2017-08-08 381 return syncpt_irq;
754716874389ccb Terje Bergstrom 2013-03-22 382
776dc38403676f4 Thierry Reding 2013-10-14 383 mutex_init(&host->devices_lock);
776dc38403676f4 Thierry Reding 2013-10-14 384 INIT_LIST_HEAD(&host->devices);
776dc38403676f4 Thierry Reding 2013-10-14 385 INIT_LIST_HEAD(&host->list);
754716874389ccb Terje Bergstrom 2013-03-22 386 host->dev = &pdev->dev;
754716874389ccb Terje Bergstrom 2013-03-22 387
754716874389ccb Terje Bergstrom 2013-03-22 388 /* set common host1x device data */
754716874389ccb Terje Bergstrom 2013-03-22 389 platform_set_drvdata(pdev, host);
754716874389ccb Terje Bergstrom 2013-03-22 390
754716874389ccb Terje Bergstrom 2013-03-22 391 host->regs = devm_ioremap_resource(&pdev->dev, regs);
754716874389ccb Terje Bergstrom 2013-03-22 392 if (IS_ERR(host->regs))
754716874389ccb Terje Bergstrom 2013-03-22 393 return PTR_ERR(host->regs);
754716874389ccb Terje Bergstrom 2013-03-22 394
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 395 if (host->info->has_hypervisor) {
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 396 host->hv_regs = devm_ioremap_resource(&pdev->dev, hv_regs);
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 397 if (IS_ERR(host->hv_regs))
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 398 return PTR_ERR(host->hv_regs);
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 399 }
f1b53c4e2c08cbd Mikko Perttunen 2017-09-05 400
d98914ebc2af450 Thierry Reding 2019-09-09 401 host->dev->dma_parms = &host->dma_parms;
d98914ebc2af450 Thierry Reding 2019-09-09 402 dma_set_max_seg_size(host->dev, UINT_MAX);
d98914ebc2af450 Thierry Reding 2019-09-09 403
754716874389ccb Terje Bergstrom 2013-03-22 404 if (host->info->init) {
754716874389ccb Terje Bergstrom 2013-03-22 405 err = host->info->init(host);
754716874389ccb Terje Bergstrom 2013-03-22 406 if (err)
754716874389ccb Terje Bergstrom 2013-03-22 407 return err;
754716874389ccb Terje Bergstrom 2013-03-22 408 }
754716874389ccb Terje Bergstrom 2013-03-22 409
754716874389ccb Terje Bergstrom 2013-03-22 410 host->clk = devm_clk_get(&pdev->dev, NULL);
754716874389ccb Terje Bergstrom 2013-03-22 411 if (IS_ERR(host->clk)) {
754716874389ccb Terje Bergstrom 2013-03-22 412 err = PTR_ERR(host->clk);
4bb923e8075f3ac Thierry Reding 2019-06-04 413
4bb923e8075f3ac Thierry Reding 2019-06-04 414 if (err != -EPROBE_DEFER)
4bb923e8075f3ac Thierry Reding 2019-06-04 415 dev_err(&pdev->dev, "failed to get clock: %d\n", err);
4bb923e8075f3ac Thierry Reding 2019-06-04 416
754716874389ccb Terje Bergstrom 2013-03-22 417 return err;
754716874389ccb Terje Bergstrom 2013-03-22 418 }
754716874389ccb Terje Bergstrom 2013-03-22 419
b386c6b73ac6c2a Thierry Reding 2017-03-21 420 host->rst = devm_reset_control_get(&pdev->dev, "host1x");
b386c6b73ac6c2a Thierry Reding 2017-03-21 421 if (IS_ERR(host->rst)) {
59e04bc20de4bd1 Christophe JAILLET 2017-04-10 422 err = PTR_ERR(host->rst);
b386c6b73ac6c2a Thierry Reding 2017-03-21 423 dev_err(&pdev->dev, "failed to get reset: %d\n", err);
b386c6b73ac6c2a Thierry Reding 2017-03-21 424 return err;
b386c6b73ac6c2a Thierry Reding 2017-03-21 425 }
af1cbfb9bf0fe07 Thierry Reding 2019-10-28 426
06867a362de08ff Thierry Reding 2019-10-28 427 err = host1x_iommu_init(host);
06867a362de08ff Thierry Reding 2019-10-28 428 if (err < 0) {
06867a362de08ff Thierry Reding 2019-10-28 429 dev_err(&pdev->dev, "failed to setup IOMMU: %d\n", err);
06867a362de08ff Thierry Reding 2019-10-28 430 return err;
404bfb78daf3bed Mikko Perttunen 2016-12-14 431 }
404bfb78daf3bed Mikko Perttunen 2016-12-14 432
8474b02531c4881 Mikko Perttunen 2017-06-15 433 err = host1x_channel_list_init(&host->channel_list,
8474b02531c4881 Mikko Perttunen 2017-06-15 434 host->info->nb_channels);
6579324a41cc414 Terje Bergstrom 2013-03-22 435 if (err) {
6579324a41cc414 Terje Bergstrom 2013-03-22 436 dev_err(&pdev->dev, "failed to initialize channel list\n");
06867a362de08ff Thierry Reding 2019-10-28 437 goto iommu_exit;
6579324a41cc414 Terje Bergstrom 2013-03-22 438 }
6579324a41cc414 Terje Bergstrom 2013-03-22 439
754716874389ccb Terje Bergstrom 2013-03-22 440 err = clk_prepare_enable(host->clk);
754716874389ccb Terje Bergstrom 2013-03-22 441 if (err < 0) {
754716874389ccb Terje Bergstrom 2013-03-22 442 dev_err(&pdev->dev, "failed to enable clock\n");
06867a362de08ff Thierry Reding 2019-10-28 443 goto free_channels;
754716874389ccb Terje Bergstrom 2013-03-22 444 }
754716874389ccb Terje Bergstrom 2013-03-22 445
b386c6b73ac6c2a Thierry Reding 2017-03-21 446 err = reset_control_deassert(host->rst);
b386c6b73ac6c2a Thierry Reding 2017-03-21 447 if (err < 0) {
b386c6b73ac6c2a Thierry Reding 2017-03-21 448 dev_err(&pdev->dev, "failed to deassert reset: %d\n", err);
06867a362de08ff Thierry Reding 2019-10-28 449 goto unprepare_disable;
b386c6b73ac6c2a Thierry Reding 2017-03-21 450 }
b386c6b73ac6c2a Thierry Reding 2017-03-21 451
754716874389ccb Terje Bergstrom 2013-03-22 452 err = host1x_syncpt_init(host);
754716874389ccb Terje Bergstrom 2013-03-22 453 if (err) {
754716874389ccb Terje Bergstrom 2013-03-22 454 dev_err(&pdev->dev, "failed to initialize syncpts\n");
06867a362de08ff Thierry Reding 2019-10-28 455 goto reset_assert;
754716874389ccb Terje Bergstrom 2013-03-22 456 }
754716874389ccb Terje Bergstrom 2013-03-22 457
7ede0b0bf3e2595 Terje Bergstrom 2013-03-22 458 err = host1x_intr_init(host, syncpt_irq);
7ede0b0bf3e2595 Terje Bergstrom 2013-03-22 459 if (err) {
7ede0b0bf3e2595 Terje Bergstrom 2013-03-22 460 dev_err(&pdev->dev, "failed to initialize interrupts\n");
06867a362de08ff Thierry Reding 2019-10-28 461 goto deinit_syncpt;
7ede0b0bf3e2595 Terje Bergstrom 2013-03-22 462 }
7ede0b0bf3e2595 Terje Bergstrom 2013-03-22 463
6236451d83a7200 Terje Bergstrom 2013-03-22 464 host1x_debug_init(host);
6236451d83a7200 Terje Bergstrom 2013-03-22 465
6841482b82e5ba8 Thierry Reding 2019-02-01 466 if (host->info->has_hypervisor)
6841482b82e5ba8 Thierry Reding 2019-02-01 467 host1x_setup_sid_table(host);
6841482b82e5ba8 Thierry Reding 2019-02-01 468
776dc38403676f4 Thierry Reding 2013-10-14 469 err = host1x_register(host);
776dc38403676f4 Thierry Reding 2013-10-14 470 if (err < 0)
f3fc6ea68bb9092 Christophe JAILLET 2020-04-26 @471 goto deinit_debugfs;
692e6d7be809922 Terje Bergstrom 2013-03-22 472
530e646a84b3159 Thierry Reding 2020-06-10 473 err = devm_of_platform_populate(&pdev->dev);
530e646a84b3159 Thierry Reding 2020-06-10 474 if (err < 0)
530e646a84b3159 Thierry Reding 2020-06-10 475 goto unregister;
530e646a84b3159 Thierry Reding 2020-06-10 476
754716874389ccb Terje Bergstrom 2013-03-22 477 return 0;
7ede0b0bf3e2595 Terje Bergstrom 2013-03-22 478
530e646a84b3159 Thierry Reding 2020-06-10 479 unregister:
530e646a84b3159 Thierry Reding 2020-06-10 480 host1x_unregister(host);
530e646a84b3159 Thierry Reding 2020-06-10 @481 deinit_intr:
f3fc6ea68bb9092 Christophe JAILLET 2020-04-26 482 host1x_debug_deinit(host);
776dc38403676f4 Thierry Reding 2013-10-14 483 host1x_intr_deinit(host);
06867a362de08ff Thierry Reding 2019-10-28 484 deinit_syncpt:
7ede0b0bf3e2595 Terje Bergstrom 2013-03-22 485 host1x_syncpt_deinit(host);
06867a362de08ff Thierry Reding 2019-10-28 486 reset_assert:
b386c6b73ac6c2a Thierry Reding 2017-03-21 487 reset_control_assert(host->rst);
06867a362de08ff Thierry Reding 2019-10-28 488 unprepare_disable:
9c78c4c38e2c188 Wei Yongjun 2013-10-21 489 clk_disable_unprepare(host->clk);
06867a362de08ff Thierry Reding 2019-10-28 490 free_channels:
8474b02531c4881 Mikko Perttunen 2017-06-15 491 host1x_channel_list_free(&host->channel_list);
06867a362de08ff Thierry Reding 2019-10-28 492 iommu_exit:
06867a362de08ff Thierry Reding 2019-10-28 493 host1x_iommu_exit(host);
404bfb78daf3bed Mikko Perttunen 2016-12-14 494
7ede0b0bf3e2595 Terje Bergstrom 2013-03-22 495 return err;
754716874389ccb Terje Bergstrom 2013-03-22 496 }
754716874389ccb Terje Bergstrom 2013-03-22 497
:::::: The code at line 471 was first introduced by commit
:::::: f3fc6ea68bb9092594d015f36b94e3d830f0a04e gpu: host1x: Clean up debugfs in error handling path
:::::: TO: Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
:::::: CC: Thierry Reding <treding(a)nvidia.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months