[linux-next:master 940/8137] net/bluetooth/mgmt_config.c:20:5: warning: stack frame size of 1104 bytes in function 'read_def_system_config'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ca0e494af5edb59002665bf12871e94b4163a257
commit: 17896406ff3592d47b476ddd29276bf9cf8a26dd [940/8137] Bluetooth: implement read/set default system parameters mgmt
config: arm-randconfig-r034-20200715 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout 17896406ff3592d47b476ddd29276bf9cf8a26dd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 warnings (new ones prefixed by >>):
>> net/bluetooth/mgmt_config.c:20:5: warning: stack frame size of 1104 bytes in function 'read_def_system_config' [-Wframe-larger-than=]
int read_def_system_config(struct sock *sk, struct hci_dev *hdev, void *data,
^
1 warning generated.
vim +/read_def_system_config +20 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 __le16 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
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[linux-next:master 7274/8137] kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ca0e494af5edb59002665bf12871e94b4163a257
commit: ac5a72ea5c8989871e61f6bb0852e0f91de51ebe [7274/8137] bpf: Use dedicated bpf_trace_printk event instead of trace_printk()
config: mips-randconfig-r022-20200715 (attached as .config)
compiler: mips64-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 ac5a72ea5c8989871e61f6bb0852e0f91de51ebe
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/trace/bpf_trace.c: In function '____bpf_trace_printk':
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
538 | return __BPF_TP_EMIT();
| ^~~~~~
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>> kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
kernel/trace/bpf_trace.c:538:2: warning: function '____bpf_trace_printk' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
vim +538 kernel/trace/bpf_trace.c
ac5a72ea5c8989 Alan Maguire 2020-07-13 405
9c959c863f8217 Alexei Starovoitov 2015-03-25 406 /*
7bda4b40c5624c John Fastabend 2017-07-02 407 * Only limited trace_printk() conversion specifiers allowed:
2df6bb5493f83c Song Liu 2020-06-29 408 * %d %i %u %x %ld %li %lu %lx %lld %lli %llu %llx %p %pB %pks %pus %s
9c959c863f8217 Alexei Starovoitov 2015-03-25 409 */
f3694e00123802 Daniel Borkmann 2016-09-09 410 BPF_CALL_5(bpf_trace_printk, char *, fmt, u32, fmt_size, u64, arg1,
f3694e00123802 Daniel Borkmann 2016-09-09 411 u64, arg2, u64, arg3)
9c959c863f8217 Alexei Starovoitov 2015-03-25 412 {
b2a5212fb63456 Daniel Borkmann 2020-05-15 413 int i, mod[3] = {}, fmt_cnt = 0;
b2a5212fb63456 Daniel Borkmann 2020-05-15 414 char buf[64], fmt_ptype;
b2a5212fb63456 Daniel Borkmann 2020-05-15 415 void *unsafe_ptr = NULL;
8d3b7dce862291 Alexei Starovoitov 2015-08-28 416 bool str_seen = false;
9c959c863f8217 Alexei Starovoitov 2015-03-25 417
9c959c863f8217 Alexei Starovoitov 2015-03-25 418 /*
9c959c863f8217 Alexei Starovoitov 2015-03-25 419 * bpf_check()->check_func_arg()->check_stack_boundary()
9c959c863f8217 Alexei Starovoitov 2015-03-25 420 * guarantees that fmt points to bpf program stack,
9c959c863f8217 Alexei Starovoitov 2015-03-25 421 * fmt_size bytes of it were initialized and fmt_size > 0
9c959c863f8217 Alexei Starovoitov 2015-03-25 422 */
9c959c863f8217 Alexei Starovoitov 2015-03-25 423 if (fmt[--fmt_size] != 0)
9c959c863f8217 Alexei Starovoitov 2015-03-25 424 return -EINVAL;
9c959c863f8217 Alexei Starovoitov 2015-03-25 425
9c959c863f8217 Alexei Starovoitov 2015-03-25 426 /* check format string for allowed specifiers */
9c959c863f8217 Alexei Starovoitov 2015-03-25 427 for (i = 0; i < fmt_size; i++) {
9c959c863f8217 Alexei Starovoitov 2015-03-25 428 if ((!isprint(fmt[i]) && !isspace(fmt[i])) || !isascii(fmt[i]))
9c959c863f8217 Alexei Starovoitov 2015-03-25 429 return -EINVAL;
9c959c863f8217 Alexei Starovoitov 2015-03-25 430
9c959c863f8217 Alexei Starovoitov 2015-03-25 431 if (fmt[i] != '%')
9c959c863f8217 Alexei Starovoitov 2015-03-25 432 continue;
9c959c863f8217 Alexei Starovoitov 2015-03-25 433
9c959c863f8217 Alexei Starovoitov 2015-03-25 434 if (fmt_cnt >= 3)
9c959c863f8217 Alexei Starovoitov 2015-03-25 435 return -EINVAL;
9c959c863f8217 Alexei Starovoitov 2015-03-25 436
9c959c863f8217 Alexei Starovoitov 2015-03-25 437 /* fmt[i] != 0 && fmt[last] == 0, so we can access fmt[i + 1] */
9c959c863f8217 Alexei Starovoitov 2015-03-25 438 i++;
9c959c863f8217 Alexei Starovoitov 2015-03-25 439 if (fmt[i] == 'l') {
9c959c863f8217 Alexei Starovoitov 2015-03-25 440 mod[fmt_cnt]++;
9c959c863f8217 Alexei Starovoitov 2015-03-25 441 i++;
b2a5212fb63456 Daniel Borkmann 2020-05-15 442 } else if (fmt[i] == 'p') {
9c959c863f8217 Alexei Starovoitov 2015-03-25 443 mod[fmt_cnt]++;
b2a5212fb63456 Daniel Borkmann 2020-05-15 444 if ((fmt[i + 1] == 'k' ||
b2a5212fb63456 Daniel Borkmann 2020-05-15 445 fmt[i + 1] == 'u') &&
b2a5212fb63456 Daniel Borkmann 2020-05-15 446 fmt[i + 2] == 's') {
b2a5212fb63456 Daniel Borkmann 2020-05-15 447 fmt_ptype = fmt[i + 1];
b2a5212fb63456 Daniel Borkmann 2020-05-15 448 i += 2;
b2a5212fb63456 Daniel Borkmann 2020-05-15 449 goto fmt_str;
b2a5212fb63456 Daniel Borkmann 2020-05-15 450 }
b2a5212fb63456 Daniel Borkmann 2020-05-15 451
2df6bb5493f83c Song Liu 2020-06-29 452 if (fmt[i + 1] == 'B') {
2df6bb5493f83c Song Liu 2020-06-29 453 i++;
2df6bb5493f83c Song Liu 2020-06-29 454 goto fmt_next;
2df6bb5493f83c Song Liu 2020-06-29 455 }
2df6bb5493f83c Song Liu 2020-06-29 456
1efb6ee3edea57 Martynas Pumputis 2018-11-23 457 /* disallow any further format extensions */
1efb6ee3edea57 Martynas Pumputis 2018-11-23 458 if (fmt[i + 1] != 0 &&
1efb6ee3edea57 Martynas Pumputis 2018-11-23 459 !isspace(fmt[i + 1]) &&
1efb6ee3edea57 Martynas Pumputis 2018-11-23 460 !ispunct(fmt[i + 1]))
9c959c863f8217 Alexei Starovoitov 2015-03-25 461 return -EINVAL;
b2a5212fb63456 Daniel Borkmann 2020-05-15 462
b2a5212fb63456 Daniel Borkmann 2020-05-15 463 goto fmt_next;
b2a5212fb63456 Daniel Borkmann 2020-05-15 464 } else if (fmt[i] == 's') {
b2a5212fb63456 Daniel Borkmann 2020-05-15 465 mod[fmt_cnt]++;
b2a5212fb63456 Daniel Borkmann 2020-05-15 466 fmt_ptype = fmt[i];
b2a5212fb63456 Daniel Borkmann 2020-05-15 467 fmt_str:
8d3b7dce862291 Alexei Starovoitov 2015-08-28 468 if (str_seen)
8d3b7dce862291 Alexei Starovoitov 2015-08-28 469 /* allow only one '%s' per fmt string */
8d3b7dce862291 Alexei Starovoitov 2015-08-28 470 return -EINVAL;
8d3b7dce862291 Alexei Starovoitov 2015-08-28 471 str_seen = true;
8d3b7dce862291 Alexei Starovoitov 2015-08-28 472
b2a5212fb63456 Daniel Borkmann 2020-05-15 473 if (fmt[i + 1] != 0 &&
b2a5212fb63456 Daniel Borkmann 2020-05-15 474 !isspace(fmt[i + 1]) &&
b2a5212fb63456 Daniel Borkmann 2020-05-15 475 !ispunct(fmt[i + 1]))
b2a5212fb63456 Daniel Borkmann 2020-05-15 476 return -EINVAL;
b2a5212fb63456 Daniel Borkmann 2020-05-15 477
8d3b7dce862291 Alexei Starovoitov 2015-08-28 478 switch (fmt_cnt) {
b2a5212fb63456 Daniel Borkmann 2020-05-15 479 case 0:
b2a5212fb63456 Daniel Borkmann 2020-05-15 480 unsafe_ptr = (void *)(long)arg1;
f3694e00123802 Daniel Borkmann 2016-09-09 481 arg1 = (long)buf;
8d3b7dce862291 Alexei Starovoitov 2015-08-28 482 break;
b2a5212fb63456 Daniel Borkmann 2020-05-15 483 case 1:
b2a5212fb63456 Daniel Borkmann 2020-05-15 484 unsafe_ptr = (void *)(long)arg2;
f3694e00123802 Daniel Borkmann 2016-09-09 485 arg2 = (long)buf;
8d3b7dce862291 Alexei Starovoitov 2015-08-28 486 break;
b2a5212fb63456 Daniel Borkmann 2020-05-15 487 case 2:
b2a5212fb63456 Daniel Borkmann 2020-05-15 488 unsafe_ptr = (void *)(long)arg3;
f3694e00123802 Daniel Borkmann 2016-09-09 489 arg3 = (long)buf;
8d3b7dce862291 Alexei Starovoitov 2015-08-28 490 break;
8d3b7dce862291 Alexei Starovoitov 2015-08-28 491 }
b2a5212fb63456 Daniel Borkmann 2020-05-15 492
d7b2977b816223 Christoph Hellwig 2020-06-08 493 bpf_trace_copy_string(buf, unsafe_ptr, fmt_ptype,
8d3b7dce862291 Alexei Starovoitov 2015-08-28 494 sizeof(buf));
b2a5212fb63456 Daniel Borkmann 2020-05-15 495 goto fmt_next;
9c959c863f8217 Alexei Starovoitov 2015-03-25 496 }
9c959c863f8217 Alexei Starovoitov 2015-03-25 497
9c959c863f8217 Alexei Starovoitov 2015-03-25 498 if (fmt[i] == 'l') {
9c959c863f8217 Alexei Starovoitov 2015-03-25 499 mod[fmt_cnt]++;
9c959c863f8217 Alexei Starovoitov 2015-03-25 500 i++;
9c959c863f8217 Alexei Starovoitov 2015-03-25 501 }
9c959c863f8217 Alexei Starovoitov 2015-03-25 502
7bda4b40c5624c John Fastabend 2017-07-02 503 if (fmt[i] != 'i' && fmt[i] != 'd' &&
7bda4b40c5624c John Fastabend 2017-07-02 504 fmt[i] != 'u' && fmt[i] != 'x')
9c959c863f8217 Alexei Starovoitov 2015-03-25 505 return -EINVAL;
b2a5212fb63456 Daniel Borkmann 2020-05-15 506 fmt_next:
9c959c863f8217 Alexei Starovoitov 2015-03-25 507 fmt_cnt++;
9c959c863f8217 Alexei Starovoitov 2015-03-25 508 }
9c959c863f8217 Alexei Starovoitov 2015-03-25 509
88a5c690b66110 Daniel Borkmann 2017-08-16 510 /* Horrid workaround for getting va_list handling working with different
88a5c690b66110 Daniel Borkmann 2017-08-16 511 * argument type combinations generically for 32 and 64 bit archs.
88a5c690b66110 Daniel Borkmann 2017-08-16 512 */
88a5c690b66110 Daniel Borkmann 2017-08-16 513 #define __BPF_TP_EMIT() __BPF_ARG3_TP()
88a5c690b66110 Daniel Borkmann 2017-08-16 514 #define __BPF_TP(...) \
ac5a72ea5c8989 Alan Maguire 2020-07-13 515 bpf_do_trace_printk(fmt, ##__VA_ARGS__)
88a5c690b66110 Daniel Borkmann 2017-08-16 516
88a5c690b66110 Daniel Borkmann 2017-08-16 517 #define __BPF_ARG1_TP(...) \
88a5c690b66110 Daniel Borkmann 2017-08-16 518 ((mod[0] == 2 || (mod[0] == 1 && __BITS_PER_LONG == 64)) \
88a5c690b66110 Daniel Borkmann 2017-08-16 519 ? __BPF_TP(arg1, ##__VA_ARGS__) \
88a5c690b66110 Daniel Borkmann 2017-08-16 520 : ((mod[0] == 1 || (mod[0] == 0 && __BITS_PER_LONG == 32)) \
88a5c690b66110 Daniel Borkmann 2017-08-16 521 ? __BPF_TP((long)arg1, ##__VA_ARGS__) \
88a5c690b66110 Daniel Borkmann 2017-08-16 522 : __BPF_TP((u32)arg1, ##__VA_ARGS__)))
88a5c690b66110 Daniel Borkmann 2017-08-16 523
88a5c690b66110 Daniel Borkmann 2017-08-16 524 #define __BPF_ARG2_TP(...) \
88a5c690b66110 Daniel Borkmann 2017-08-16 525 ((mod[1] == 2 || (mod[1] == 1 && __BITS_PER_LONG == 64)) \
88a5c690b66110 Daniel Borkmann 2017-08-16 526 ? __BPF_ARG1_TP(arg2, ##__VA_ARGS__) \
88a5c690b66110 Daniel Borkmann 2017-08-16 527 : ((mod[1] == 1 || (mod[1] == 0 && __BITS_PER_LONG == 32)) \
88a5c690b66110 Daniel Borkmann 2017-08-16 528 ? __BPF_ARG1_TP((long)arg2, ##__VA_ARGS__) \
88a5c690b66110 Daniel Borkmann 2017-08-16 529 : __BPF_ARG1_TP((u32)arg2, ##__VA_ARGS__)))
88a5c690b66110 Daniel Borkmann 2017-08-16 530
88a5c690b66110 Daniel Borkmann 2017-08-16 531 #define __BPF_ARG3_TP(...) \
88a5c690b66110 Daniel Borkmann 2017-08-16 532 ((mod[2] == 2 || (mod[2] == 1 && __BITS_PER_LONG == 64)) \
88a5c690b66110 Daniel Borkmann 2017-08-16 533 ? __BPF_ARG2_TP(arg3, ##__VA_ARGS__) \
88a5c690b66110 Daniel Borkmann 2017-08-16 534 : ((mod[2] == 1 || (mod[2] == 0 && __BITS_PER_LONG == 32)) \
88a5c690b66110 Daniel Borkmann 2017-08-16 535 ? __BPF_ARG2_TP((long)arg3, ##__VA_ARGS__) \
88a5c690b66110 Daniel Borkmann 2017-08-16 536 : __BPF_ARG2_TP((u32)arg3, ##__VA_ARGS__)))
88a5c690b66110 Daniel Borkmann 2017-08-16 537
88a5c690b66110 Daniel Borkmann 2017-08-16 @538 return __BPF_TP_EMIT();
9c959c863f8217 Alexei Starovoitov 2015-03-25 539 }
9c959c863f8217 Alexei Starovoitov 2015-03-25 540
:::::: The code at line 538 was first introduced by commit
:::::: 88a5c690b66110ad255380d8f629c629cf6ca559 bpf: fix bpf_trace_printk on 32 bit archs
:::::: TO: Daniel Borkmann <daniel(a)iogearbox.net>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[rcar:gmsl/dev 23/24] drivers/regulator/gpio-regulator.c:245:54: warning: format specifies type 'int' but the argument has type 'long'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git gmsl/dev
head: 73e3ee66deb28072d44a06d4996854442f049d23
commit: ad66c71305dbc51e01c94cf22fd62d179c34a52f [23/24] DNI: Regulator: Debug
config: riscv-randconfig-r015-20200715 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
git checkout ad66c71305dbc51e01c94cf22fd62d179c34a52f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:95:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/regulator/gpio-regulator.c:26:
In file included from include/linux/regulator/machine.h:16:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:58:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:97:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from drivers/regulator/gpio-regulator.c:26:
In file included from include/linux/regulator/machine.h:16:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:98:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from drivers/regulator/gpio-regulator.c:26:
In file included from include/linux/regulator/machine.h:16:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:99:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from drivers/regulator/gpio-regulator.c:26:
In file included from include/linux/regulator/machine.h:16:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:1017:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/regulator/gpio-regulator.c:245:54: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
dev_err(dev, "OF_GET_GPIO_REGULATOR_CONFIG %d\n", PTR_ERR(config));
~~ ^~~~~~~~~~~~~~~
%ld
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
8 warnings generated.
vim +245 drivers/regulator/gpio-regulator.c
223
224 static int gpio_regulator_probe(struct platform_device *pdev)
225 {
226 struct device *dev = &pdev->dev;
227 struct gpio_regulator_config *config = dev_get_platdata(dev);
228 struct device_node *np = dev->of_node;
229 struct gpio_regulator_data *drvdata;
230 struct regulator_config cfg = { };
231 struct regulator_dev *rdev;
232 enum gpiod_flags gflags;
233 int ptr, ret, state, i;
234
235 drvdata = devm_kzalloc(dev, sizeof(struct gpio_regulator_data),
236 GFP_KERNEL);
237 if (drvdata == NULL)
238 return -ENOMEM;
239
240 if (np) {
241 config = of_get_gpio_regulator_config(dev, np,
242 &drvdata->desc);
243
244 if (IS_ERR(config)) {
> 245 dev_err(dev, "OF_GET_GPIO_REGULATOR_CONFIG %d\n", PTR_ERR(config));
246 return PTR_ERR(config);
247 }
248 }
249
250 dev_err(dev, "Probing GPIO Regulator\n");
251
252 drvdata->desc.name = devm_kstrdup(dev, config->supply_name, GFP_KERNEL);
253 if (drvdata->desc.name == NULL) {
254 dev_err(dev, "Failed to allocate supply name\n");
255 return -ENOMEM;
256 }
257
258 drvdata->gpiods = devm_kzalloc(dev, sizeof(struct gpio_desc *),
259 GFP_KERNEL);
260 if (!drvdata->gpiods)
261 return -ENOMEM;
262
263 for (i = 0; i < config->ngpios; i++) {
264 drvdata->gpiods[i] = devm_gpiod_get_index(dev,
265 NULL,
266 i,
267 config->gflags[i]);
268 if (IS_ERR(drvdata->gpiods[i]))
269 return PTR_ERR(drvdata->gpiods[i]);
270 /* This is good to know */
271 gpiod_set_consumer_name(drvdata->gpiods[i], drvdata->desc.name);
272 }
273 drvdata->nr_gpios = config->ngpios;
274
275 drvdata->states = devm_kmemdup(dev,
276 config->states,
277 config->nr_states *
278 sizeof(struct gpio_regulator_state),
279 GFP_KERNEL);
280 if (drvdata->states == NULL) {
281 dev_err(dev, "Failed to allocate state data\n");
282 return -ENOMEM;
283 }
284 drvdata->nr_states = config->nr_states;
285
286 drvdata->desc.owner = THIS_MODULE;
287 drvdata->desc.enable_time = config->startup_delay;
288
289 /* handle regulator type*/
290 switch (config->type) {
291 case REGULATOR_VOLTAGE:
292 drvdata->desc.type = REGULATOR_VOLTAGE;
293 drvdata->desc.ops = &gpio_regulator_voltage_ops;
294 drvdata->desc.n_voltages = config->nr_states;
295 break;
296 case REGULATOR_CURRENT:
297 drvdata->desc.type = REGULATOR_CURRENT;
298 drvdata->desc.ops = &gpio_regulator_current_ops;
299 break;
300 default:
301 dev_err(dev, "No regulator type set\n");
302 return -EINVAL;
303 }
304
305 /* build initial state from gpio init data. */
306 state = 0;
307 for (ptr = 0; ptr < drvdata->nr_gpios; ptr++) {
308 if (config->gflags[ptr] == GPIOD_OUT_HIGH)
309 state |= (1 << ptr);
310 }
311 drvdata->state = state;
312
313 cfg.dev = dev;
314 cfg.init_data = config->init_data;
315 cfg.driver_data = drvdata;
316 cfg.of_node = np;
317
318 /*
319 * The signal will be inverted by the GPIO core if flagged so in the
320 * decriptor.
321 */
322 if (config->enabled_at_boot)
323 gflags = GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE;
324 else
325 gflags = GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE;
326
327 cfg.ena_gpiod = gpiod_get_optional(dev, "enable", gflags);
328 if (IS_ERR(cfg.ena_gpiod))
329 return PTR_ERR(cfg.ena_gpiod);
330
331 rdev = devm_regulator_register(dev, &drvdata->desc, &cfg);
332 if (IS_ERR(rdev)) {
333 ret = PTR_ERR(rdev);
334 dev_err(dev, "Failed to register regulator: %d\n", ret);
335 return ret;
336 }
337
338 platform_set_drvdata(pdev, drvdata);
339
340 return 0;
341 }
342
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[rcar:gmsl/dev 23/24] drivers/regulator/gpio-regulator.c:245:17: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git gmsl/dev
head: 73e3ee66deb28072d44a06d4996854442f049d23
commit: ad66c71305dbc51e01c94cf22fd62d179c34a52f [23/24] DNI: Regulator: Debug
config: openrisc-randconfig-r024-20200715 (attached as .config)
compiler: or1k-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 ad66c71305dbc51e01c94cf22fd62d179c34a52f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/regulator/gpio-regulator.c:24:
drivers/regulator/gpio-regulator.c: In function 'gpio_regulator_probe':
>> drivers/regulator/gpio-regulator.c:245:17: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
245 | dev_err(dev, "OF_GET_GPIO_REGULATOR_CONFIG %d\n", PTR_ERR(config));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/regulator/gpio-regulator.c:245:4: note: in expansion of macro 'dev_err'
245 | dev_err(dev, "OF_GET_GPIO_REGULATOR_CONFIG %d\n", PTR_ERR(config));
| ^~~~~~~
drivers/regulator/gpio-regulator.c:245:48: note: format string is defined here
245 | dev_err(dev, "OF_GET_GPIO_REGULATOR_CONFIG %d\n", PTR_ERR(config));
| ~^
| |
| int
| %ld
vim +245 drivers/regulator/gpio-regulator.c
223
224 static int gpio_regulator_probe(struct platform_device *pdev)
225 {
226 struct device *dev = &pdev->dev;
227 struct gpio_regulator_config *config = dev_get_platdata(dev);
228 struct device_node *np = dev->of_node;
229 struct gpio_regulator_data *drvdata;
230 struct regulator_config cfg = { };
231 struct regulator_dev *rdev;
232 enum gpiod_flags gflags;
233 int ptr, ret, state, i;
234
235 drvdata = devm_kzalloc(dev, sizeof(struct gpio_regulator_data),
236 GFP_KERNEL);
237 if (drvdata == NULL)
238 return -ENOMEM;
239
240 if (np) {
241 config = of_get_gpio_regulator_config(dev, np,
242 &drvdata->desc);
243
244 if (IS_ERR(config)) {
> 245 dev_err(dev, "OF_GET_GPIO_REGULATOR_CONFIG %d\n", PTR_ERR(config));
246 return PTR_ERR(config);
247 }
248 }
249
250 dev_err(dev, "Probing GPIO Regulator\n");
251
252 drvdata->desc.name = devm_kstrdup(dev, config->supply_name, GFP_KERNEL);
253 if (drvdata->desc.name == NULL) {
254 dev_err(dev, "Failed to allocate supply name\n");
255 return -ENOMEM;
256 }
257
258 drvdata->gpiods = devm_kzalloc(dev, sizeof(struct gpio_desc *),
259 GFP_KERNEL);
260 if (!drvdata->gpiods)
261 return -ENOMEM;
262
263 for (i = 0; i < config->ngpios; i++) {
264 drvdata->gpiods[i] = devm_gpiod_get_index(dev,
265 NULL,
266 i,
267 config->gflags[i]);
268 if (IS_ERR(drvdata->gpiods[i]))
269 return PTR_ERR(drvdata->gpiods[i]);
270 /* This is good to know */
271 gpiod_set_consumer_name(drvdata->gpiods[i], drvdata->desc.name);
272 }
273 drvdata->nr_gpios = config->ngpios;
274
275 drvdata->states = devm_kmemdup(dev,
276 config->states,
277 config->nr_states *
278 sizeof(struct gpio_regulator_state),
279 GFP_KERNEL);
280 if (drvdata->states == NULL) {
281 dev_err(dev, "Failed to allocate state data\n");
282 return -ENOMEM;
283 }
284 drvdata->nr_states = config->nr_states;
285
286 drvdata->desc.owner = THIS_MODULE;
287 drvdata->desc.enable_time = config->startup_delay;
288
289 /* handle regulator type*/
290 switch (config->type) {
291 case REGULATOR_VOLTAGE:
292 drvdata->desc.type = REGULATOR_VOLTAGE;
293 drvdata->desc.ops = &gpio_regulator_voltage_ops;
294 drvdata->desc.n_voltages = config->nr_states;
295 break;
296 case REGULATOR_CURRENT:
297 drvdata->desc.type = REGULATOR_CURRENT;
298 drvdata->desc.ops = &gpio_regulator_current_ops;
299 break;
300 default:
301 dev_err(dev, "No regulator type set\n");
302 return -EINVAL;
303 }
304
305 /* build initial state from gpio init data. */
306 state = 0;
307 for (ptr = 0; ptr < drvdata->nr_gpios; ptr++) {
308 if (config->gflags[ptr] == GPIOD_OUT_HIGH)
309 state |= (1 << ptr);
310 }
311 drvdata->state = state;
312
313 cfg.dev = dev;
314 cfg.init_data = config->init_data;
315 cfg.driver_data = drvdata;
316 cfg.of_node = np;
317
318 /*
319 * The signal will be inverted by the GPIO core if flagged so in the
320 * decriptor.
321 */
322 if (config->enabled_at_boot)
323 gflags = GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE;
324 else
325 gflags = GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE;
326
327 cfg.ena_gpiod = gpiod_get_optional(dev, "enable", gflags);
328 if (IS_ERR(cfg.ena_gpiod))
329 return PTR_ERR(cfg.ena_gpiod);
330
331 rdev = devm_regulator_register(dev, &drvdata->desc, &cfg);
332 if (IS_ERR(rdev)) {
333 ret = PTR_ERR(rdev);
334 dev_err(dev, "Failed to register regulator: %d\n", ret);
335 return ret;
336 }
337
338 platform_set_drvdata(pdev, drvdata);
339
340 return 0;
341 }
342
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
arch/riscv/kernel/smpboot.c:109:5: warning: no previous prototype for 'start_secondary_cpu'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e9919e11e219eaa5e8041b7b1a196839143e9125
commit: 2875fe0561569f82d0e63658ccf0d11ce7da8922 RISC-V: Add cpu_ops and modify default booting method
date: 4 months ago
config: riscv-randconfig-r011-20200715 (attached as .config)
compiler: riscv32-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 2875fe0561569f82d0e63658ccf0d11ce7da8922
# 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 warnings (new ones prefixed by >>):
>> arch/riscv/kernel/smpboot.c:109:5: warning: no previous prototype for 'start_secondary_cpu' [-Wmissing-prototypes]
109 | int start_secondary_cpu(int cpu, struct task_struct *tidle)
| ^~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/smpboot.c:146:34: warning: no previous prototype for 'smp_callin' [-Wmissing-prototypes]
146 | asmlinkage __visible void __init smp_callin(void)
| ^~~~~~~~~~
vim +/start_secondary_cpu +109 arch/riscv/kernel/smpboot.c
108
> 109 int start_secondary_cpu(int cpu, struct task_struct *tidle)
110 {
111 if (cpu_ops[cpu]->cpu_start)
112 return cpu_ops[cpu]->cpu_start(cpu, tidle);
113
114 return -EOPNOTSUPP;
115 }
116
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[wireless-drivers-next:master 40/69] drivers/net/wireless/realtek/rtw88/rtw8821c.c:71:8: warning: 'const' type qualifier on return type has no effect
by kernel test robot
Hi Tzu-En,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-ne... master
head: b28bd97c1c191ade3736b33f2b24e5b288b90ab4
commit: f745eb9ca5bf823bc5c0f82a434cefb41c57844e [40/69] rtw88: 8821c: Add 8821CE to Kconfig and Makefile
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout f745eb9ca5bf823bc5c0f82a434cefb41c57844e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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/net/wireless/realtek/rtw88/rtw8821c.c:71:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
static const u8 rtw8821c_get_swing_index(struct rtw_dev *rtwdev)
^~~~~~
1 warning generated.
vim +/const +71 drivers/net/wireless/realtek/rtw88/rtw8821c.c
3a4312828ce13e Tzu-En Huang 2020-06-03 70
3a4312828ce13e Tzu-En Huang 2020-06-03 @71 static const u8 rtw8821c_get_swing_index(struct rtw_dev *rtwdev)
3a4312828ce13e Tzu-En Huang 2020-06-03 72 {
3a4312828ce13e Tzu-En Huang 2020-06-03 73 u8 i = 0;
3a4312828ce13e Tzu-En Huang 2020-06-03 74 u32 swing, table_value;
3a4312828ce13e Tzu-En Huang 2020-06-03 75
3a4312828ce13e Tzu-En Huang 2020-06-03 76 swing = rtw_read32_mask(rtwdev, REG_TXSCALE_A, 0xffe00000);
3a4312828ce13e Tzu-En Huang 2020-06-03 77 for (i = 0; i < ARRAY_SIZE(rtw8821c_txscale_tbl); i++) {
3a4312828ce13e Tzu-En Huang 2020-06-03 78 table_value = rtw8821c_txscale_tbl[i];
3a4312828ce13e Tzu-En Huang 2020-06-03 79 if (swing == table_value)
3a4312828ce13e Tzu-En Huang 2020-06-03 80 break;
3a4312828ce13e Tzu-En Huang 2020-06-03 81 }
3a4312828ce13e Tzu-En Huang 2020-06-03 82
3a4312828ce13e Tzu-En Huang 2020-06-03 83 return i;
3a4312828ce13e Tzu-En Huang 2020-06-03 84 }
3a4312828ce13e Tzu-En Huang 2020-06-03 85
:::::: The code at line 71 was first introduced by commit
:::::: 3a4312828ce13e1645fd3af76e4314a2623b3361 rtw88: 8821c: add power tracking
:::::: TO: Tzu-En Huang <tehuang(a)realtek.com>
:::::: CC: Kalle Valo <kvalo(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[linux-review:UPDATE-20200715-200047/Leo-Yan/arm64-perf-Proper-cap_user_time-support/20200715-100926 2/6] arch/arm64/kernel/perf_event.c:1181:8: error: implicit declaration of function 'sched_clock_read_begin'; did you mean
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200715-200047/Leo-Yan/a...
head: a959bcdf86a1be629d8a1eb641f37d37b4b4838d
commit: 11c8d85d0bddffd23a4ebf6456aa8368fba3fff0 [2/6] arm64: perf: Implement correct cap_user_time
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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 11c8d85d0bddffd23a4ebf6456aa8368fba3fff0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 error/warnings (new ones prefixed by >>):
arch/arm64/kernel/perf_event.c:138:41: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_RD'
138 | [C(L1D)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:84:45: warning: initialized field overwritten [-Woverride-init]
84 | #define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR 0x41
| ^~~~
arch/arm64/kernel/perf_event.c:139:44: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR'
139 | [C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:84:45: note: (near initialization for 'armv8_vulcan_perf_cache_map[0][1][0]')
84 | #define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR 0x41
| ^~~~
arch/arm64/kernel/perf_event.c:139:44: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR'
139 | [C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:86:51: warning: initialized field overwritten [-Woverride-init]
86 | #define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR 0x43
| ^~~~
arch/arm64/kernel/perf_event.c:140:42: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR'
140 | [C(L1D)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:86:51: note: (near initialization for 'armv8_vulcan_perf_cache_map[0][1][1]')
86 | #define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR 0x43
| ^~~~
arch/arm64/kernel/perf_event.c:140:42: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR'
140 | [C(L1D)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:95:44: warning: initialized field overwritten [-Woverride-init]
95 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD 0x4E
| ^~~~
arch/arm64/kernel/perf_event.c:142:44: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD'
142 | [C(DTLB)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:95:44: note: (near initialization for 'armv8_vulcan_perf_cache_map[3][0][0]')
95 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD 0x4E
| ^~~~
arch/arm64/kernel/perf_event.c:142:44: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD'
142 | [C(DTLB)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:96:44: warning: initialized field overwritten [-Woverride-init]
96 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR 0x4F
| ^~~~
arch/arm64/kernel/perf_event.c:143:45: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR'
143 | [C(DTLB)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:96:44: note: (near initialization for 'armv8_vulcan_perf_cache_map[3][1][0]')
96 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR 0x4F
| ^~~~
arch/arm64/kernel/perf_event.c:143:45: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR'
143 | [C(DTLB)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:93:50: warning: initialized field overwritten [-Woverride-init]
93 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD 0x4C
| ^~~~
arch/arm64/kernel/perf_event.c:144:42: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD'
144 | [C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:93:50: note: (near initialization for 'armv8_vulcan_perf_cache_map[3][0][1]')
93 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD 0x4C
| ^~~~
arch/arm64/kernel/perf_event.c:144:42: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD'
144 | [C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:94:50: warning: initialized field overwritten [-Woverride-init]
94 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR 0x4D
| ^~~~
arch/arm64/kernel/perf_event.c:145:43: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR'
145 | [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:94:50: note: (near initialization for 'armv8_vulcan_perf_cache_map[3][1][1]')
94 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR 0x4D
| ^~~~
arch/arm64/kernel/perf_event.c:145:43: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR'
145 | [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:110:46: warning: initialized field overwritten [-Woverride-init]
110 | #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD 0x60
| ^~~~
arch/arm64/kernel/perf_event.c:147:44: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD'
147 | [C(NODE)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:110:46: note: (near initialization for 'armv8_vulcan_perf_cache_map[6][0][0]')
110 | #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD 0x60
| ^~~~
arch/arm64/kernel/perf_event.c:147:44: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD'
147 | [C(NODE)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:111:46: warning: initialized field overwritten [-Woverride-init]
111 | #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR 0x61
| ^~~~
arch/arm64/kernel/perf_event.c:148:45: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR'
148 | [C(NODE)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:111:46: note: (near initialization for 'armv8_vulcan_perf_cache_map[6][1][0]')
111 | #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR 0x61
| ^~~~
arch/arm64/kernel/perf_event.c:148:45: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR'
148 | [C(NODE)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/perf_event.c: In function 'arch_perf_update_userpage':
>> arch/arm64/kernel/perf_event.c:1181:8: error: implicit declaration of function 'sched_clock_read_begin'; did you mean 'sched_clock_register'? [-Werror=implicit-function-declaration]
1181 | rd = sched_clock_read_begin(&seq);
| ^~~~~~~~~~~~~~~~~~~~~~
| sched_clock_register
>> arch/arm64/kernel/perf_event.c:1181:6: warning: assignment to 'struct clock_read_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1181 | rd = sched_clock_read_begin(&seq);
| ^
>> arch/arm64/kernel/perf_event.c:1183:25: error: dereferencing pointer to incomplete type 'struct clock_read_data'
1183 | userpg->time_mult = rd->mult;
| ^~
>> arch/arm64/kernel/perf_event.c:1199:11: error: implicit declaration of function 'sched_clock_read_retry'; did you mean 'sched_clock_register'? [-Werror=implicit-function-declaration]
1199 | } while (sched_clock_read_retry(seq));
| ^~~~~~~~~~~~~~~~~~~~~~
| sched_clock_register
cc1: some warnings being treated as errors
vim +1181 arch/arm64/kernel/perf_event.c
1165
1166 void arch_perf_update_userpage(struct perf_event *event,
1167 struct perf_event_mmap_page *userpg, u64 now)
1168 {
1169 struct clock_read_data *rd;
1170 unsigned int seq;
1171 u64 quot, rem, ns;
1172
1173 /*
1174 * Internal timekeeping for enabled/running/stopped times
1175 * is always computed with the sched_clock.
1176 */
1177 userpg->cap_user_time = 1;
1178 userpg->cap_user_time_zero = 1;
1179
1180 do {
> 1181 rd = sched_clock_read_begin(&seq);
1182
> 1183 userpg->time_mult = rd->mult;
1184 userpg->time_shift = rd->shift;
1185 userpg->time_zero = rd->epoch_ns;
1186
1187 /*
1188 * This isn't strictly correct, the ARM64 counter can be
1189 * 'short' and then we get funnies when it wraps. The correct
1190 * thing would be to extend the perf ABI with a cycle and mask
1191 * value, but because wrapping on ARM64 is very rare in
1192 * practise this 'works'.
1193 */
1194 quot = rd->epoch_cyc >> rd->shift;
1195 rem = rd->epoch_cyc & (((u64)1 << rd->shift) - 1);
1196 ns = quot * rd->mult + ((rem * rd->mult) >> rd->shift);
1197 userpg->time_zero -= ns;
1198
> 1199 } while (sched_clock_read_retry(seq));
1200
1201 userpg->time_offset = userpg->time_zero - now;
1202
1203 /*
1204 * time_shift is not expected to be greater than 31 due to
1205 * the original published conversion algorithm shifting a
1206 * 32-bit value (now specifies a 64-bit value) - refer
1207 * perf_event_mmap_page documentation in perf_event.h.
1208 */
1209 if (userpg->time_shift == 32) {
1210 userpg->time_shift = 31;
1211 userpg->time_mult >>= 1;
1212 }
1213
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[hch-misc:sockopt-cleanups 6/6] net/phonet/socket.c:445:3: error: 'const struct proto_ops' has no member named 'compat_setsockopt'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git sockopt-cleanups
head: 0264f2fcbf6787d9084710c3f5adb536affc2022
commit: 0264f2fcbf6787d9084710c3f5adb536affc2022 [6/6] net: remove compat_sock_common_{get,set}sockopt
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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 0264f2fcbf6787d9084710c3f5adb536affc2022
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 error/warnings (new ones prefixed by >>):
>> net/phonet/socket.c:445:3: error: 'const struct proto_ops' has no member named 'compat_setsockopt'
445 | .compat_setsockopt = sock_no_setsockopt,
| ^~~~~~~~~~~~~~~~~
>> net/phonet/socket.c:445:23: error: initialization of 'void (*)(struct seq_file *, struct socket *)' from incompatible pointer type 'int (*)(struct socket *, int, int, char *, unsigned int)' [-Werror=incompatible-pointer-types]
445 | .compat_setsockopt = sock_no_setsockopt,
| ^~~~~~~~~~~~~~~~~~
net/phonet/socket.c:445:23: note: (near initialization for 'phonet_dgram_ops.show_fdinfo')
>> net/phonet/socket.c:446:3: error: 'const struct proto_ops' has no member named 'compat_getsockopt'
446 | .compat_getsockopt = sock_no_getsockopt,
| ^~~~~~~~~~~~~~~~~
>> net/phonet/socket.c:446:23: error: initialization of 'int (*)(struct socket *, struct msghdr *, size_t)' {aka 'int (*)(struct socket *, struct msghdr *, long unsigned int)'} from incompatible pointer type 'int (*)(struct socket *, int, int, char *, int *)' [-Werror=incompatible-pointer-types]
446 | .compat_getsockopt = sock_no_getsockopt,
| ^~~~~~~~~~~~~~~~~~
net/phonet/socket.c:446:23: note: (near initialization for 'phonet_dgram_ops.sendmsg')
>> net/phonet/socket.c:448:13: warning: initialized field overwritten [-Woverride-init]
448 | .sendmsg = pn_socket_sendmsg,
| ^~~~~~~~~~~~~~~~~
net/phonet/socket.c:448:13: note: (near initialization for 'phonet_dgram_ops.sendmsg')
cc1: some warnings being treated as errors
vim +445 net/phonet/socket.c
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 428
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 429 const struct proto_ops phonet_dgram_ops = {
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 430 .family = AF_PHONET,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 431 .owner = THIS_MODULE,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 432 .release = pn_socket_release,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 433 .bind = pn_socket_bind,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 434 .connect = sock_no_connect,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 435 .socketpair = sock_no_socketpair,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 436 .accept = sock_no_accept,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 437 .getname = pn_socket_getname,
a11e1d432b51f63 Linus Torvalds 2018-06-28 438 .poll = datagram_poll,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 439 .ioctl = pn_socket_ioctl,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 440 .listen = sock_no_listen,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 441 .shutdown = sock_no_shutdown,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 442 .setsockopt = sock_no_setsockopt,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 443 .getsockopt = sock_no_getsockopt,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 444 #ifdef CONFIG_COMPAT
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 @445 .compat_setsockopt = sock_no_setsockopt,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 @446 .compat_getsockopt = sock_no_getsockopt,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 447 #endif
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 @448 .sendmsg = pn_socket_sendmsg,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 449 .recvmsg = sock_common_recvmsg,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 450 .mmap = sock_no_mmap,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 451 .sendpage = sock_no_sendpage,
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 452 };
ba113a94b7503ee Remi Denis-Courmont 2008-09-22 453
:::::: The code at line 445 was first introduced by commit
:::::: ba113a94b7503ee23ffe819e7045134b0c1d31de Phonet: common socket glue
:::::: TO: Remi Denis-Courmont <remi.denis-courmont(a)nokia.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[hch-misc:sockopt-cleanups 4/6] net/core/sock.c:825:28: error: storage size of 'f32' isn't known
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git sockopt-cleanups
head: 0264f2fcbf6787d9084710c3f5adb536affc2022
commit: d8999fc632dd22b6da1bab932bd84b4d74bc1951 [4/6] net: simplify cBPF setsockopt compat handling
config: openrisc-randconfig-r035-20200715 (attached as .config)
compiler: or1k-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 d8999fc632dd22b6da1bab932bd84b4d74bc1951
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
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 >>):
net/core/sock.c: In function 'copy_bpf_fprog_from_user':
>> net/core/sock.c:825:28: error: storage size of 'f32' isn't known
825 | struct compat_sock_fprog f32;
| ^~~
>> net/core/sock.c:827:21: error: invalid application of 'sizeof' to incomplete type 'struct compat_sock_fprog'
827 | if (len != sizeof(struct compat_sock_fprog))
| ^~~~~~
net/core/sock.c:829:40: error: invalid application of 'sizeof' to incomplete type 'struct compat_sock_fprog'
829 | if (copy_from_user(&f32, src, sizeof(struct compat_sock_fprog)))
| ^~~~~~
net/core/sock.c:825:28: warning: unused variable 'f32' [-Wunused-variable]
825 | struct compat_sock_fprog f32;
| ^~~
vim +825 net/core/sock.c
821
822 int copy_bpf_fprog_from_user(struct sock_fprog *dst, void __user *src, int len)
823 {
824 if (in_compat_syscall()) {
> 825 struct compat_sock_fprog f32;
826
> 827 if (len != sizeof(struct compat_sock_fprog))
828 return -EINVAL;
829 if (copy_from_user(&f32, src, sizeof(struct compat_sock_fprog)))
830 return -EFAULT;
831 memset(dst, 0, sizeof(*dst));
832 dst->len = f32.len;
833 dst->filter = compat_ptr(f32.filter);
834 } else {
835 if (len != sizeof(struct sock_fprog))
836 return -EINVAL;
837 if (copy_from_user(dst, src, sizeof(struct sock_fprog)))
838 return -EFAULT;
839 }
840
841 return 0;
842 }
843 EXPORT_SYMBOL_GPL(copy_bpf_fprog_from_user);
844
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[linux-stable-rc:linux-5.4.y 1166/3868] drivers/scsi/qla2xxx/qla_iocb.c:3418:32: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head: e72abf1f11a982a2a3fb555b5a9bd2eb2011dee8
commit: 99a1bdf6ae39501f5678c29bff6cb80906227519 [1166/3868] scsi: qla2xxx: Use explicit LOGO in target mode
config: xtensa-randconfig-s031-20200715 (attached as .config)
compiler: xtensa-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-49-g707c5017-dirty
git checkout 99a1bdf6ae39501f5678c29bff6cb80906227519
# 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=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/scsi/qla2xxx/qla_iocb.c:2494:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] timeout @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2494:22: sparse: expected unsigned short [usertype] timeout
drivers/scsi/qla2xxx/qla_iocb.c:2494:22: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2495:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] control_flags @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2495:28: sparse: expected unsigned int [usertype] control_flags
drivers/scsi/qla2xxx/qla_iocb.c:2495:28: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2657:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] nport_handle @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2657:32: sparse: expected unsigned short [usertype] nport_handle
drivers/scsi/qla2xxx/qla_iocb.c:2657:32: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2893:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] nport_handle @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2893:32: sparse: expected unsigned short [usertype] nport_handle
drivers/scsi/qla2xxx/qla_iocb.c:2893:32: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2894:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] tx_dsd_count @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2894:32: sparse: expected unsigned short [usertype] tx_dsd_count
drivers/scsi/qla2xxx/qla_iocb.c:2894:32: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2897:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] rx_dsd_count @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2897:32: sparse: expected unsigned short [usertype] rx_dsd_count
drivers/scsi/qla2xxx/qla_iocb.c:2897:32: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2942:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] extended @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2942:9: sparse: expected unsigned short [usertype] extended
drivers/scsi/qla2xxx/qla_iocb.c:2942:9: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2943:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] status @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2943:25: sparse: expected unsigned short [usertype] status
drivers/scsi/qla2xxx/qla_iocb.c:2943:25: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2944:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] control_flags @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2944:32: sparse: expected unsigned short [usertype] control_flags
drivers/scsi/qla2xxx/qla_iocb.c:2944:32: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2946:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] cmd_dsd_count @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2946:32: sparse: expected unsigned short [usertype] cmd_dsd_count
drivers/scsi/qla2xxx/qla_iocb.c:2946:32: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2948:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] total_dsd_count @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2948:34: sparse: expected unsigned short [usertype] total_dsd_count
drivers/scsi/qla2xxx/qla_iocb.c:2948:34: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2950:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] req_bytecount @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2950:32: sparse: expected unsigned int [usertype] req_bytecount
drivers/scsi/qla2xxx/qla_iocb.c:2950:32: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2952:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] rsp_bytecount @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:2952:32: sparse: expected unsigned int [usertype] rsp_bytecount
drivers/scsi/qla2xxx/qla_iocb.c:2952:32: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:2957:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] length @@ got unsigned int [usertype] req_bytecount @@
drivers/scsi/qla2xxx/qla_iocb.c:2957:33: sparse: expected restricted __le32 [usertype] length
drivers/scsi/qla2xxx/qla_iocb.c:2957:33: sparse: got unsigned int [usertype] req_bytecount
drivers/scsi/qla2xxx/qla_iocb.c:2961:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] length @@ got unsigned int [usertype] rsp_bytecount @@
drivers/scsi/qla2xxx/qla_iocb.c:2961:33: sparse: expected restricted __le32 [usertype] length
drivers/scsi/qla2xxx/qla_iocb.c:2961:33: sparse: got unsigned int [usertype] rsp_bytecount
drivers/scsi/qla2xxx/qla_iocb.c:3011:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] nport_handle @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3011:31: sparse: expected unsigned short [usertype] nport_handle
drivers/scsi/qla2xxx/qla_iocb.c:3011:31: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3013:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] comp_status @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3013:30: sparse: expected unsigned short [usertype] comp_status
drivers/scsi/qla2xxx/qla_iocb.c:3013:30: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3018:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] cmd_dsd_count @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3018:32: sparse: expected unsigned short [usertype] cmd_dsd_count
drivers/scsi/qla2xxx/qla_iocb.c:3018:32: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3020:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] rsp_dsd_count @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3020:32: sparse: expected unsigned short [usertype] rsp_dsd_count
drivers/scsi/qla2xxx/qla_iocb.c:3020:32: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3021:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] cmd_byte_count @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3021:33: sparse: expected unsigned int [usertype] cmd_byte_count
drivers/scsi/qla2xxx/qla_iocb.c:3021:33: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3237:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] dseg_count @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3237:37: sparse: expected unsigned short [usertype] dseg_count
drivers/scsi/qla2xxx/qla_iocb.c:3237:37: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3240:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] nport_handle @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3240:39: sparse: expected unsigned short [usertype] nport_handle
drivers/scsi/qla2xxx/qla_iocb.c:3240:39: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3271:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __be32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3271:25: sparse: expected unsigned int [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3271:25: sparse: got restricted __be32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3273:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] fcp_cmnd_dseg_len @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3273:44: sparse: expected unsigned short [usertype] fcp_cmnd_dseg_len
drivers/scsi/qla2xxx/qla_iocb.c:3273:44: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3278:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] byte_count @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3278:37: sparse: expected unsigned int [usertype] byte_count
drivers/scsi/qla2xxx/qla_iocb.c:3278:37: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3308:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] dseg_count @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3308:37: sparse: expected unsigned short [usertype] dseg_count
drivers/scsi/qla2xxx/qla_iocb.c:3308:37: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3311:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] nport_handle @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3311:39: sparse: expected unsigned short [usertype] nport_handle
drivers/scsi/qla2xxx/qla_iocb.c:3311:39: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3329:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] byte_count @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3329:37: sparse: expected unsigned int [usertype] byte_count
drivers/scsi/qla2xxx/qla_iocb.c:3329:37: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3407:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] handle @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3407:26: sparse: expected unsigned int [usertype] handle
drivers/scsi/qla2xxx/qla_iocb.c:3407:26: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3409:40: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] nport_handle @@ got restricted __le16 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3409:40: sparse: expected unsigned short [usertype] nport_handle
drivers/scsi/qla2xxx/qla_iocb.c:3409:40: sparse: got restricted __le16 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3415:13: sparse: sparse: cast from restricted __le16
drivers/scsi/qla2xxx/qla_iocb.c:3415:13: sparse: sparse: cast from restricted __le16
drivers/scsi/qla2xxx/qla_iocb.c:3415:13: sparse: sparse: cast from restricted __le16
drivers/scsi/qla2xxx/qla_iocb.c:3415:13: sparse: sparse: cast from restricted __le16
drivers/scsi/qla2xxx/qla_iocb.c:3415:13: sparse: sparse: cast from restricted __le16
drivers/scsi/qla2xxx/qla_iocb.c:3415:13: sparse: sparse: cast from restricted __le16
drivers/scsi/qla2xxx/qla_iocb.c:3414:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] handle_to_abort @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_iocb.c:3414:35: sparse: expected unsigned int [usertype] handle_to_abort
drivers/scsi/qla2xxx/qla_iocb.c:3414:35: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_iocb.c:3418:32: sparse: sparse: cast from restricted __le16
>> drivers/scsi/qla2xxx/qla_iocb.c:3418:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] val @@ got restricted __le16 [usertype] req_que_no @@
>> drivers/scsi/qla2xxx/qla_iocb.c:3418:32: sparse: expected unsigned short [usertype] val
drivers/scsi/qla2xxx/qla_iocb.c:3418:32: sparse: got restricted __le16 [usertype] req_que_no
drivers/scsi/qla2xxx/qla_iocb.c:3418:32: sparse: sparse: too many warnings
vim +3418 drivers/scsi/qla2xxx/qla_iocb.c
5162cf0c4e3962 Giridhar Malavali 2011-11-18 3396
6d78e5576b9450 Joe Carnuccio 2014-09-25 3397 static void
4440e46d5db7b4 Armen Baloyan 2014-02-26 3398 qla24xx_abort_iocb(srb_t *sp, struct abort_entry_24xx *abt_iocb)
4440e46d5db7b4 Armen Baloyan 2014-02-26 3399 {
4440e46d5db7b4 Armen Baloyan 2014-02-26 3400 struct srb_iocb *aio = &sp->u.iocb_cmd;
25ff6af10562cf Joe Carnuccio 2017-01-19 3401 scsi_qla_host_t *vha = sp->vha;
49cecca7dd49e2 Quinn Tran 2018-08-31 3402 struct req_que *req = sp->qpair->req;
4440e46d5db7b4 Armen Baloyan 2014-02-26 3403
4440e46d5db7b4 Armen Baloyan 2014-02-26 3404 memset(abt_iocb, 0, sizeof(struct abort_entry_24xx));
4440e46d5db7b4 Armen Baloyan 2014-02-26 3405 abt_iocb->entry_type = ABORT_IOCB_TYPE;
4440e46d5db7b4 Armen Baloyan 2014-02-26 3406 abt_iocb->entry_count = 1;
f3767225021a48 Himanshu Madhani 2018-02-01 3407 abt_iocb->handle = cpu_to_le32(MAKE_HANDLE(req->id, sp->handle));
49cecca7dd49e2 Quinn Tran 2018-08-31 3408 if (sp->fcport) {
4440e46d5db7b4 Armen Baloyan 2014-02-26 3409 abt_iocb->nport_handle = cpu_to_le16(sp->fcport->loop_id);
4440e46d5db7b4 Armen Baloyan 2014-02-26 3410 abt_iocb->port_id[0] = sp->fcport->d_id.b.al_pa;
4440e46d5db7b4 Armen Baloyan 2014-02-26 3411 abt_iocb->port_id[1] = sp->fcport->d_id.b.area;
4440e46d5db7b4 Armen Baloyan 2014-02-26 3412 abt_iocb->port_id[2] = sp->fcport->d_id.b.domain;
49cecca7dd49e2 Quinn Tran 2018-08-31 3413 }
49cecca7dd49e2 Quinn Tran 2018-08-31 3414 abt_iocb->handle_to_abort =
49cecca7dd49e2 Quinn Tran 2018-08-31 3415 cpu_to_le32(MAKE_HANDLE(aio->u.abt.req_que_no,
49cecca7dd49e2 Quinn Tran 2018-08-31 3416 aio->u.abt.cmd_hndl));
4440e46d5db7b4 Armen Baloyan 2014-02-26 3417 abt_iocb->vp_index = vha->vp_idx;
b027a5ace443f4 Darren Trapp 2018-01-15 @3418 abt_iocb->req_que_no = cpu_to_le16(aio->u.abt.req_que_no);
4440e46d5db7b4 Armen Baloyan 2014-02-26 3419 /* Send the command to the firmware */
4440e46d5db7b4 Armen Baloyan 2014-02-26 3420 wmb();
4440e46d5db7b4 Armen Baloyan 2014-02-26 3421 }
4440e46d5db7b4 Armen Baloyan 2014-02-26 3422
:::::: The code at line 3418 was first introduced by commit
:::::: b027a5ace443f4f1eb58648ab236025b7b0f6df9 scsi: qla2xxx: Fix queue ID for async abort with Multiqueue
:::::: TO: Darren Trapp <darren.trapp(a)cavium.com>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months