[linux-next:master 5053/7963] virtio.c:undefined reference to `virtio_check_driver_offered_feature'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4b358aabb93a2c654cd1dcab1a25a589f6e2b153
commit: 46abe13b5e3db187e52cd0de06c07bbce010726c [5053/7963] firmware: arm_scmi: Add virtio transport
config: ia64-randconfig-r032-20210815 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 46abe13b5e3db187e52cd0de06c07bbce010726c
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash
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 >>):
ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_chan_available':
>> virtio.c:(.text+0x4b2): undefined reference to `virtio_check_driver_offered_feature'
ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `scmi_vio_probe':
virtio.c:(.text+0x622): undefined reference to `virtio_check_driver_offered_feature'
>> ia64-linux-ld: virtio.c:(.text+0x792): undefined reference to `virtqueue_get_vring_size'
ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `scmi_vio_feed_vq_rx.isra.0':
>> virtio.c:(.text+0xa12): undefined reference to `virtqueue_add_inbuf'
>> ia64-linux-ld: virtio.c:(.text+0xb22): undefined reference to `virtqueue_kick'
ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_send_message':
>> virtio.c:(.text+0x1132): undefined reference to `virtqueue_add_sgs'
ia64-linux-ld: virtio.c:(.text+0x1252): undefined reference to `virtqueue_kick'
ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `scmi_vio_complete_cb':
>> virtio.c:(.text+0x1bc2): undefined reference to `virtqueue_disable_cb'
>> ia64-linux-ld: virtio.c:(.text+0x1bd2): undefined reference to `virtqueue_get_buf'
>> ia64-linux-ld: virtio.c:(.text+0x1e92): undefined reference to `virtqueue_enable_cb'
ia64-linux-ld: virtio.c:(.text+0x2182): undefined reference to `virtqueue_enable_cb'
ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_scmi_init':
>> virtio.c:(.init.text+0x22): undefined reference to `register_virtio_driver'
`virtio_scmi_exit' referenced in section `.rodata' of drivers/firmware/arm_scmi/virtio.o: defined in discarded section `.exit.text' of drivers/firmware/arm_scmi/virtio.o
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *, void *, u64)' {aka 'int (*)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka...
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7c60610d476766e128cc4284bb6349732cbd6606
commit: e6a4750ffe9d701c4d55212b14b615e63571d235 bpf, xdp: Make bpf_redirect_map() a map operation
date: 5 months ago
config: arc-randconfig-p002-20210813 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e6a4750ffe9d701c4d55212b14b615e63571d235
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/bpf_verifier.h:9,
from kernel/bpf/verifier.c:12:
kernel/bpf/verifier.c: In function 'jit_subprogs':
include/linux/filter.h:363:18: warning: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
363 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:11662:37: note: in expansion of macro 'BPF_CAST_CALL'
11662 | insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
| ^~~~~~~~~~~~~
kernel/bpf/verifier.c: In function 'do_misc_fixups':
include/linux/filter.h:363:18: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
363 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12070:45: note: in expansion of macro 'BPF_CAST_CALL'
12070 | insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
| ^~~~~~~~~~~~~
>> include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *, void *, u64)' {aka 'int (*)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
363 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12074:45: note: in expansion of macro 'BPF_CAST_CALL'
12074 | insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
| ^~~~~~~~~~~~~
>> include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
363 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12078:45: note: in expansion of macro 'BPF_CAST_CALL'
12078 | insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
| ^~~~~~~~~~~~~
>> include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *, u64)' {aka 'int (*)(struct bpf_map *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
363 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12082:45: note: in expansion of macro 'BPF_CAST_CALL'
12082 | insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
| ^~~~~~~~~~~~~
>> include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
363 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12086:45: note: in expansion of macro 'BPF_CAST_CALL'
12086 | insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
| ^~~~~~~~~~~~~
>> include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
363 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12090:45: note: in expansion of macro 'BPF_CAST_CALL'
12090 | insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
| ^~~~~~~~~~~~~
>> include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, u32, u64)' {aka 'int (*)(struct bpf_map *, unsigned int, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
363 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:12094:45: note: in expansion of macro 'BPF_CAST_CALL'
12094 | insn->imm = BPF_CAST_CALL(ops->map_redirect) -
| ^~~~~~~~~~~~~
vim +363 include/linux/filter.h
f8f6d679aaa78b9 Daniel Borkmann 2014-05-29 361
09772d92cd5ad99 Daniel Borkmann 2018-06-02 362 #define BPF_CAST_CALL(x) \
09772d92cd5ad99 Daniel Borkmann 2018-06-02 @363 ((u64 (*)(u64, u64, u64, u64, u64))(x))
09772d92cd5ad99 Daniel Borkmann 2018-06-02 364
:::::: The code at line 363 was first introduced by commit
:::::: 09772d92cd5ad998b0d5f6f46cd1658f8cb698cf bpf: avoid retpoline for lookup/update/delete calls on maps
:::::: TO: Daniel Borkmann <daniel(a)iogearbox.net>
:::::: CC: Alexei Starovoitov <ast(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 690/8423] kernel/trace/trace_events_hist.c:4594:13: warning: stack frame size (1280) exceeds limit (1024) in function 'hist_trigger_print_key'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b9011c7e671dbbf59bb753283ddfd03f0c9eb865
commit: f2f6175186f4ccd33a710f4cd557676a5cc60153 [690/8423] kallsyms: increase maximum kernel symbol length to 512
config: arm-randconfig-r034-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f2f6175186f4ccd33a710f4cd557676a5cc60153
# 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 >>):
kernel/trace/trace_events_hist.c:5228:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int ret;
^
>> kernel/trace/trace_events_hist.c:4594:13: warning: stack frame size (1280) exceeds limit (1024) in function 'hist_trigger_print_key' [-Wframe-larger-than]
static void hist_trigger_print_key(struct seq_file *m,
^
2 warnings generated.
vim +/hist_trigger_print_key +4594 kernel/trace/trace_events_hist.c
69a0200c2e25d6 Tom Zanussi 2016-03-03 4593
a3785b7eca8fd4 Tom Zanussi 2019-02-13 @4594 static void hist_trigger_print_key(struct seq_file *m,
a3785b7eca8fd4 Tom Zanussi 2019-02-13 4595 struct hist_trigger_data *hist_data,
a3785b7eca8fd4 Tom Zanussi 2019-02-13 4596 void *key,
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4597 struct tracing_map_elt *elt)
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4598 {
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4599 struct hist_field *key_field;
c6afad49d127f6 Tom Zanussi 2016-03-03 4600 char str[KSYM_SYMBOL_LEN];
69a0200c2e25d6 Tom Zanussi 2016-03-03 4601 bool multiline = false;
85013256cf0162 Tom Zanussi 2017-09-22 4602 const char *field_name;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4603 unsigned int i;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4604 u64 uval;
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4605
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4606 seq_puts(m, "{ ");
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4607
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4608 for_each_hist_key_field(i, hist_data) {
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4609 key_field = hist_data->fields[i];
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4610
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4611 if (i > hist_data->n_vals)
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4612 seq_puts(m, ", ");
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4613
85013256cf0162 Tom Zanussi 2017-09-22 4614 field_name = hist_field_name(key_field, 0);
85013256cf0162 Tom Zanussi 2017-09-22 4615
0c4a6b4666e8eb Tom Zanussi 2016-03-03 4616 if (key_field->flags & HIST_FIELD_FL_HEX) {
0c4a6b4666e8eb Tom Zanussi 2016-03-03 4617 uval = *(u64 *)(key + key_field->offset);
85013256cf0162 Tom Zanussi 2017-09-22 4618 seq_printf(m, "%s: %llx", field_name, uval);
c6afad49d127f6 Tom Zanussi 2016-03-03 4619 } else if (key_field->flags & HIST_FIELD_FL_SYM) {
c6afad49d127f6 Tom Zanussi 2016-03-03 4620 uval = *(u64 *)(key + key_field->offset);
c6afad49d127f6 Tom Zanussi 2016-03-03 4621 sprint_symbol_no_offset(str, uval);
85013256cf0162 Tom Zanussi 2017-09-22 4622 seq_printf(m, "%s: [%llx] %-45s", field_name,
85013256cf0162 Tom Zanussi 2017-09-22 4623 uval, str);
c6afad49d127f6 Tom Zanussi 2016-03-03 4624 } else if (key_field->flags & HIST_FIELD_FL_SYM_OFFSET) {
c6afad49d127f6 Tom Zanussi 2016-03-03 4625 uval = *(u64 *)(key + key_field->offset);
c6afad49d127f6 Tom Zanussi 2016-03-03 4626 sprint_symbol(str, uval);
85013256cf0162 Tom Zanussi 2017-09-22 4627 seq_printf(m, "%s: [%llx] %-55s", field_name,
85013256cf0162 Tom Zanussi 2017-09-22 4628 uval, str);
6b4827ad028a1a Tom Zanussi 2016-03-03 4629 } else if (key_field->flags & HIST_FIELD_FL_EXECNAME) {
af6a29bcaf8ff2 Tom Zanussi 2018-01-15 4630 struct hist_elt_data *elt_data = elt->private_data;
af6a29bcaf8ff2 Tom Zanussi 2018-01-15 4631 char *comm;
af6a29bcaf8ff2 Tom Zanussi 2018-01-15 4632
af6a29bcaf8ff2 Tom Zanussi 2018-01-15 4633 if (WARN_ON_ONCE(!elt_data))
af6a29bcaf8ff2 Tom Zanussi 2018-01-15 4634 return;
af6a29bcaf8ff2 Tom Zanussi 2018-01-15 4635
af6a29bcaf8ff2 Tom Zanussi 2018-01-15 4636 comm = elt_data->comm;
6b4827ad028a1a Tom Zanussi 2016-03-03 4637
6b4827ad028a1a Tom Zanussi 2016-03-03 4638 uval = *(u64 *)(key + key_field->offset);
85013256cf0162 Tom Zanussi 2017-09-22 4639 seq_printf(m, "%s: %-16s[%10llu]", field_name,
85013256cf0162 Tom Zanussi 2017-09-22 4640 comm, uval);
316961988b5ec7 Tom Zanussi 2016-03-03 4641 } else if (key_field->flags & HIST_FIELD_FL_SYSCALL) {
316961988b5ec7 Tom Zanussi 2016-03-03 4642 const char *syscall_name;
316961988b5ec7 Tom Zanussi 2016-03-03 4643
316961988b5ec7 Tom Zanussi 2016-03-03 4644 uval = *(u64 *)(key + key_field->offset);
316961988b5ec7 Tom Zanussi 2016-03-03 4645 syscall_name = get_syscall_name(uval);
316961988b5ec7 Tom Zanussi 2016-03-03 4646 if (!syscall_name)
316961988b5ec7 Tom Zanussi 2016-03-03 4647 syscall_name = "unknown_syscall";
316961988b5ec7 Tom Zanussi 2016-03-03 4648
85013256cf0162 Tom Zanussi 2017-09-22 4649 seq_printf(m, "%s: %-30s[%3llu]", field_name,
85013256cf0162 Tom Zanussi 2017-09-22 4650 syscall_name, uval);
69a0200c2e25d6 Tom Zanussi 2016-03-03 4651 } else if (key_field->flags & HIST_FIELD_FL_STACKTRACE) {
69a0200c2e25d6 Tom Zanussi 2016-03-03 4652 seq_puts(m, "stacktrace:\n");
69a0200c2e25d6 Tom Zanussi 2016-03-03 4653 hist_trigger_stacktrace_print(m,
69a0200c2e25d6 Tom Zanussi 2016-03-03 4654 key + key_field->offset,
69a0200c2e25d6 Tom Zanussi 2016-03-03 4655 HIST_STACKTRACE_DEPTH);
69a0200c2e25d6 Tom Zanussi 2016-03-03 4656 multiline = true;
4b94f5b7b4a5ff Namhyung Kim 2016-03-03 4657 } else if (key_field->flags & HIST_FIELD_FL_LOG2) {
85013256cf0162 Tom Zanussi 2017-09-22 4658 seq_printf(m, "%s: ~ 2^%-2llu", field_name,
4b94f5b7b4a5ff Namhyung Kim 2016-03-03 4659 *(u64 *)(key + key_field->offset));
0c4a6b4666e8eb Tom Zanussi 2016-03-03 4660 } else if (key_field->flags & HIST_FIELD_FL_STRING) {
85013256cf0162 Tom Zanussi 2017-09-22 4661 seq_printf(m, "%s: %-50s", field_name,
76a3b0c8ac344e Tom Zanussi 2016-03-03 4662 (char *)(key + key_field->offset));
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4663 } else {
76a3b0c8ac344e Tom Zanussi 2016-03-03 4664 uval = *(u64 *)(key + key_field->offset);
85013256cf0162 Tom Zanussi 2017-09-22 4665 seq_printf(m, "%s: %10llu", field_name, uval);
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4666 }
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4667 }
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4668
69a0200c2e25d6 Tom Zanussi 2016-03-03 4669 if (!multiline)
69a0200c2e25d6 Tom Zanussi 2016-03-03 4670 seq_puts(m, " ");
69a0200c2e25d6 Tom Zanussi 2016-03-03 4671
7ef224d1d0e3a1 Tom Zanussi 2016-03-03 4672 seq_puts(m, "}");
a3785b7eca8fd4 Tom Zanussi 2019-02-13 4673 }
a3785b7eca8fd4 Tom Zanussi 2019-02-13 4674
:::::: The code at line 4594 was first introduced by commit
:::::: a3785b7eca8fd45c7c39f2ddfcd67368af30c1b4 tracing: Add hist trigger snapshot() action
:::::: TO: Tom Zanussi <tom.zanussi(a)linux.intel.com>
:::::: CC: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-stable-rc:linux-5.4.y 3729/4278] drivers/crypto/inside-secure/safexcel_cipher.c:303:12: warning: stack frame size (1032) exceeds limit (1024) in function 'safexcel_aead_setkey'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head: f52a40401ee9825556cc803c110c67bfec5f6b94
commit: c2c5dc84ac51da90cadcb12554c69bdd5ac7aeeb [3729/4278] compiler.h: fix barrier_data() on clang
config: mips-randconfig-c004-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.4.y
git checkout c2c5dc84ac51da90cadcb12554c69bdd5ac7aeeb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):
>> drivers/crypto/inside-secure/safexcel_cipher.c:303:12: warning: stack frame size (1032) exceeds limit (1024) in function 'safexcel_aead_setkey' [-Wframe-larger-than]
static int safexcel_aead_setkey(struct crypto_aead *ctfm, const u8 *key,
^
1 warning generated.
vim +/safexcel_aead_setkey +303 drivers/crypto/inside-secure/safexcel_cipher.c
1b44c5a60c137e Antoine Tenart 2017-05-24 302
77cdd4efe57134 Pascal van Leeuwen 2019-07-05 @303 static int safexcel_aead_setkey(struct crypto_aead *ctfm, const u8 *key,
f6beaea304872b Antoine Tenart 2018-05-14 304 unsigned int len)
f6beaea304872b Antoine Tenart 2018-05-14 305 {
f6beaea304872b Antoine Tenart 2018-05-14 306 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm);
f6beaea304872b Antoine Tenart 2018-05-14 307 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm);
f6beaea304872b Antoine Tenart 2018-05-14 308 struct safexcel_ahash_export_state istate, ostate;
f6beaea304872b Antoine Tenart 2018-05-14 309 struct safexcel_crypto_priv *priv = ctx->priv;
f6beaea304872b Antoine Tenart 2018-05-14 310 struct crypto_authenc_keys keys;
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 311 struct crypto_aes_ctx aes;
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 312 int err = -EINVAL;
f6beaea304872b Antoine Tenart 2018-05-14 313
f6beaea304872b Antoine Tenart 2018-05-14 314 if (crypto_authenc_extractkeys(&keys, key, len) != 0)
f6beaea304872b Antoine Tenart 2018-05-14 315 goto badkey;
f6beaea304872b Antoine Tenart 2018-05-14 316
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 317 if (ctx->mode == CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD) {
f26882a3475eb7 Pascal van Leeuwen 2019-07-30 318 /* Minimum keysize is minimum AES key size + nonce size */
f26882a3475eb7 Pascal van Leeuwen 2019-07-30 319 if (keys.enckeylen < (AES_MIN_KEY_SIZE +
f26882a3475eb7 Pascal van Leeuwen 2019-07-30 320 CTR_RFC3686_NONCE_SIZE))
f6beaea304872b Antoine Tenart 2018-05-14 321 goto badkey;
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 322 /* last 4 bytes of key are the nonce! */
f26882a3475eb7 Pascal van Leeuwen 2019-07-30 323 ctx->nonce = *(u32 *)(keys.enckey + keys.enckeylen -
f26882a3475eb7 Pascal van Leeuwen 2019-07-30 324 CTR_RFC3686_NONCE_SIZE);
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 325 /* exclude the nonce here */
f26882a3475eb7 Pascal van Leeuwen 2019-07-30 326 keys.enckeylen -= CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD;
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 327 }
f6beaea304872b Antoine Tenart 2018-05-14 328
f6beaea304872b Antoine Tenart 2018-05-14 329 /* Encryption key */
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 330 switch (ctx->alg) {
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 331 case SAFEXCEL_3DES:
21f5a15e0f26c7 Ard Biesheuvel 2019-08-15 332 err = verify_aead_des3_key(ctfm, keys.enckey, keys.enckeylen);
77cdd4efe57134 Pascal van Leeuwen 2019-07-05 333 if (unlikely(err))
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 334 goto badkey_expflags;
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 335 break;
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 336 case SAFEXCEL_AES:
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 337 err = aes_expandkey(&aes, keys.enckey, keys.enckeylen);
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 338 if (unlikely(err))
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 339 goto badkey;
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 340 break;
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 341 default:
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 342 dev_err(priv->dev, "aead: unsupported cipher algorithm\n");
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 343 goto badkey;
77cdd4efe57134 Pascal van Leeuwen 2019-07-05 344 }
77cdd4efe57134 Pascal van Leeuwen 2019-07-05 345
53c83e915ce8b2 Antoine Tenart 2018-06-28 346 if (priv->flags & EIP197_TRC_CACHE && ctx->base.ctxr_dma &&
f6beaea304872b Antoine Tenart 2018-05-14 347 memcmp(ctx->key, keys.enckey, keys.enckeylen))
f6beaea304872b Antoine Tenart 2018-05-14 348 ctx->base.needs_inv = true;
f6beaea304872b Antoine Tenart 2018-05-14 349
f6beaea304872b Antoine Tenart 2018-05-14 350 /* Auth key */
a7dea8c0ff9f25 Ofer Heifetz 2018-06-28 351 switch (ctx->hash_alg) {
01ba061d0fd769 Antoine Tenart 2018-05-14 352 case CONTEXT_CONTROL_CRYPTO_ALG_SHA1:
01ba061d0fd769 Antoine Tenart 2018-05-14 353 if (safexcel_hmac_setkey("safexcel-sha1", keys.authkey,
01ba061d0fd769 Antoine Tenart 2018-05-14 354 keys.authkeylen, &istate, &ostate))
01ba061d0fd769 Antoine Tenart 2018-05-14 355 goto badkey;
01ba061d0fd769 Antoine Tenart 2018-05-14 356 break;
678b2878ac396f Antoine Tenart 2018-05-14 357 case CONTEXT_CONTROL_CRYPTO_ALG_SHA224:
678b2878ac396f Antoine Tenart 2018-05-14 358 if (safexcel_hmac_setkey("safexcel-sha224", keys.authkey,
678b2878ac396f Antoine Tenart 2018-05-14 359 keys.authkeylen, &istate, &ostate))
678b2878ac396f Antoine Tenart 2018-05-14 360 goto badkey;
678b2878ac396f Antoine Tenart 2018-05-14 361 break;
678b2878ac396f Antoine Tenart 2018-05-14 362 case CONTEXT_CONTROL_CRYPTO_ALG_SHA256:
f6beaea304872b Antoine Tenart 2018-05-14 363 if (safexcel_hmac_setkey("safexcel-sha256", keys.authkey,
f6beaea304872b Antoine Tenart 2018-05-14 364 keys.authkeylen, &istate, &ostate))
f6beaea304872b Antoine Tenart 2018-05-14 365 goto badkey;
678b2878ac396f Antoine Tenart 2018-05-14 366 break;
ea23cb533ce419 Antoine Tenart 2018-05-29 367 case CONTEXT_CONTROL_CRYPTO_ALG_SHA384:
ea23cb533ce419 Antoine Tenart 2018-05-29 368 if (safexcel_hmac_setkey("safexcel-sha384", keys.authkey,
ea23cb533ce419 Antoine Tenart 2018-05-29 369 keys.authkeylen, &istate, &ostate))
ea23cb533ce419 Antoine Tenart 2018-05-29 370 goto badkey;
ea23cb533ce419 Antoine Tenart 2018-05-29 371 break;
87eee125e7490c Antoine Tenart 2018-05-29 372 case CONTEXT_CONTROL_CRYPTO_ALG_SHA512:
87eee125e7490c Antoine Tenart 2018-05-29 373 if (safexcel_hmac_setkey("safexcel-sha512", keys.authkey,
87eee125e7490c Antoine Tenart 2018-05-29 374 keys.authkeylen, &istate, &ostate))
87eee125e7490c Antoine Tenart 2018-05-29 375 goto badkey;
87eee125e7490c Antoine Tenart 2018-05-29 376 break;
678b2878ac396f Antoine Tenart 2018-05-14 377 default:
678b2878ac396f Antoine Tenart 2018-05-14 378 dev_err(priv->dev, "aead: unsupported hash algorithm\n");
678b2878ac396f Antoine Tenart 2018-05-14 379 goto badkey;
678b2878ac396f Antoine Tenart 2018-05-14 380 }
f6beaea304872b Antoine Tenart 2018-05-14 381
f6beaea304872b Antoine Tenart 2018-05-14 382 crypto_aead_set_flags(ctfm, crypto_aead_get_flags(ctfm) &
f6beaea304872b Antoine Tenart 2018-05-14 383 CRYPTO_TFM_RES_MASK);
f6beaea304872b Antoine Tenart 2018-05-14 384
53c83e915ce8b2 Antoine Tenart 2018-06-28 385 if (priv->flags & EIP197_TRC_CACHE && ctx->base.ctxr_dma &&
f6beaea304872b Antoine Tenart 2018-05-14 386 (memcmp(ctx->ipad, istate.state, ctx->state_sz) ||
f6beaea304872b Antoine Tenart 2018-05-14 387 memcmp(ctx->opad, ostate.state, ctx->state_sz)))
f6beaea304872b Antoine Tenart 2018-05-14 388 ctx->base.needs_inv = true;
f6beaea304872b Antoine Tenart 2018-05-14 389
f6beaea304872b Antoine Tenart 2018-05-14 390 /* Now copy the keys into the context */
f6beaea304872b Antoine Tenart 2018-05-14 391 memcpy(ctx->key, keys.enckey, keys.enckeylen);
f6beaea304872b Antoine Tenart 2018-05-14 392 ctx->key_len = keys.enckeylen;
f6beaea304872b Antoine Tenart 2018-05-14 393
f6beaea304872b Antoine Tenart 2018-05-14 394 memcpy(ctx->ipad, &istate.state, ctx->state_sz);
f6beaea304872b Antoine Tenart 2018-05-14 395 memcpy(ctx->opad, &ostate.state, ctx->state_sz);
f6beaea304872b Antoine Tenart 2018-05-14 396
f6beaea304872b Antoine Tenart 2018-05-14 397 memzero_explicit(&keys, sizeof(keys));
f6beaea304872b Antoine Tenart 2018-05-14 398 return 0;
f6beaea304872b Antoine Tenart 2018-05-14 399
f6beaea304872b Antoine Tenart 2018-05-14 400 badkey:
f6beaea304872b Antoine Tenart 2018-05-14 401 crypto_aead_set_flags(ctfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 402 badkey_expflags:
f6beaea304872b Antoine Tenart 2018-05-14 403 memzero_explicit(&keys, sizeof(keys));
0e17e3621a28a6 Pascal van Leeuwen 2019-07-05 404 return err;
f6beaea304872b Antoine Tenart 2018-05-14 405 }
f6beaea304872b Antoine Tenart 2018-05-14 406
:::::: The code at line 303 was first introduced by commit
:::::: 77cdd4efe571345e9c116e65f64a616969e0bc35 crypto: inside-secure - add support for authenc(hmac(sha1),cbc(des3_ede))
:::::: TO: Pascal van Leeuwen <pascalvanl(a)gmail.com>
:::::: CC: Herbert Xu <herbert(a)gondor.apana.org.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH 5/7] genirq/affinity: move group_cpus_evenly() into lib/
by kernel test robot
Hi Ming,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/irq/core]
[also build test WARNING on next-20210813]
[cannot apply to block/for-next linux/master linus/master v5.14-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Ming-Lei/genirq-affinity-abstrac...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
04c2721d3530f0723b4c922a8fa9f26b202a20de
config: x86_64-randconfig-c001-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project
1f7b25ea76a925aca690da28de9d78db7ca99d0c)
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
#
https://github.com/0day-ci/linux/commit/759f72186bfdd5c3ba8b53ac0749cf7ba...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Ming-Lei/genirq-affinity-abstract-new-API-from-managed-irq-affinity-spread/20210814-203741
git checkout 759f72186bfdd5c3ba8b53ac0749cf7ba930012c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (6 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
lib/glob.c:48:32: warning: Assigned value is garbage or undefined
[clang-analyzer-core.uninitialized.Assign]
char const *back_pat = NULL, *back_str = back_str;
^ ~~~~~~~~
lib/glob.c:48:32: note: Assigned value is garbage or undefined
char const *back_pat = NULL, *back_str = back_str;
^ ~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
lib/strnlen_user.c:34:2: warning: Value stored to 'src' is never
read [clang-analyzer-deadcode.DeadStores]
src -= align;
^ ~~~~~
lib/strnlen_user.c:34:2: note: Value stored to 'src' is never read
src -= align;
^ ~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
lib/oid_registry.c:149:3: warning: Value stored to 'num' is never
read [clang-analyzer-deadcode.DeadStores]
num = 0;
^ ~
lib/oid_registry.c:149:3: note: Value stored to 'num' is never read
num = 0;
^ ~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
9 warnings generated.
Suppressed 9 warnings (2 in non-user code, 7 with check filters).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
7 warnings generated.
>> lib/group_cpus.c:236:22: warning: Division by zero [clang-analyzer-core.DivideZero]
numgrps * ncpus / remaining_ncpus);
^
lib/group_cpus.c:352:2: note: Taking false branch
if (!zalloc_cpumask_var(&nmsk, GFP_KERNEL))
^
lib/group_cpus.c:355:2: note: Taking false branch
if (!zalloc_cpumask_var(&npresmsk, GFP_KERNEL))
^
lib/group_cpus.c:359:7: note: 'node_to_cpumask' is non-null
if (!node_to_cpumask)
^~~~~~~~~~~~~~~
lib/group_cpus.c:359:2: note: Taking false branch
if (!node_to_cpumask)
^
lib/group_cpus.c:363:6: note: Assuming 'masks' is non-null
if (!masks)
^~~~~~
lib/group_cpus.c:363:2: note: Taking false branch
if (!masks)
^
lib/group_cpus.c:371:8: note: Calling '__group_cpus_evenly'
ret = __group_cpus_evenly(curgrp, numgrps, node_to_cpumask,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/group_cpus.c:257:6: note: Assuming the condition is false
if (!cpumask_weight(cpu_mask))
^~~~~~~~~~~~~~~~~~~~~~~~~
lib/group_cpus.c:257:2: note: Taking false branch
if (!cpumask_weight(cpu_mask))
^
lib/group_cpus.c:266:6: note: Assuming 'numgrps' is > 'nodes'
if (numgrps <= nodes) {
^~~~~~~~~~~~~~~~
lib/group_cpus.c:266:2: note: Taking false branch
if (numgrps <= nodes) {
^
lib/group_cpus.c:279:6: note: Assuming 'node_groups' is non-null
if (!node_groups)
^~~~~~~~~~~~
lib/group_cpus.c:279:2: note: Taking false branch
if (!node_groups)
^
lib/group_cpus.c:283:2: note: Calling 'alloc_nodes_groups'
alloc_nodes_groups(numgrps, node_to_cpumask, cpu_mask,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/group_cpus.c:134:14: note: 'remaining_ncpus' initialized to 0
unsigned n, remaining_ncpus = 0;
^~~~~~~~~~~~~~~
lib/group_cpus.c:136:2: note: Loop condition is true. Entering loop
body
for (n = 0; n < nr_node_ids; n++) {
^
lib/group_cpus.c:136:2: note: Loop condition is false. Execution
continues on line 141
lib/group_cpus.c:141:2: note: Taking false branch
for_each_node_mask(n, nodemsk) {
^
include/linux/nodemask.h:384:2: note: expanded from macro
'for_each_node_mask'
if (!nodes_empty(mask)) \
^
lib/group_cpus.c:153:12: note: '__UNIQUE_ID___x401' is <
'__UNIQUE_ID___y402'
numgrps = min_t(unsigned, remaining_ncpus, numgrps);
^
include/linux/minmax.h:104:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y),
op))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^~~
lib/group_cpus.c:153:12: note: '?' condition is true
numgrps = min_t(unsigned, remaining_ncpus, numgrps);
^
include/linux/minmax.h:104:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y),
op))
^
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^
lib/group_cpus.c:226:2: note: Loop condition is true. Entering loop
body
for (n = 0; n < nr_node_ids; n++) {
^
lib/group_cpus.c:229:7: note: Assuming the condition is false
if (node_groups[n].ncpus == UINT_MAX)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/group_cpus.c:229:3: note: Taking false branch
if (node_groups[n].ncpus == UINT_MAX)
^
lib/group_cpus.c:232:3: note: Taking true branch
WARN_ON_ONCE(numgrps == 0);
^
include/asm-generic/bug.h:105:2: note: expanded from macro
'WARN_ON_ONCE'
vim +236 lib/group_cpus.c
759f72186bfdd5 Ming Lei 2021-08-14 113 759f72186bfdd5 Ming Lei
2021-08-14 114 /*
759f72186bfdd5 Ming Lei 2021-08-14 115 * Allocate group number for
each node, so that for each node:
759f72186bfdd5 Ming Lei 2021-08-14 116 *
759f72186bfdd5 Ming Lei 2021-08-14 117 * 1) the allocated number is >= 1
759f72186bfdd5 Ming Lei 2021-08-14 118 *
759f72186bfdd5 Ming Lei 2021-08-14 119 * 2) the allocated number is
<= active CPU number of this node
759f72186bfdd5 Ming Lei 2021-08-14 120 *
759f72186bfdd5 Ming Lei 2021-08-14 121 * The actual allocated total
groups may be less than @numgrps when
759f72186bfdd5 Ming Lei 2021-08-14 122 * active total CPU number is
less than @numgrps.
759f72186bfdd5 Ming Lei 2021-08-14 123 *
759f72186bfdd5 Ming Lei 2021-08-14 124 * Active CPUs means the CPUs
in '@cpu_mask AND @node_to_cpumask[]'
759f72186bfdd5 Ming Lei 2021-08-14 125 * for each node.
759f72186bfdd5 Ming Lei 2021-08-14 126 */
759f72186bfdd5 Ming Lei 2021-08-14 127 static void
alloc_nodes_groups(unsigned int numgrps,
759f72186bfdd5 Ming Lei 2021-08-14 128 cpumask_var_t
*node_to_cpumask,
759f72186bfdd5 Ming Lei 2021-08-14 129 const struct cpumask
*cpu_mask,
759f72186bfdd5 Ming Lei 2021-08-14 130 const nodemask_t nodemsk,
759f72186bfdd5 Ming Lei 2021-08-14 131 struct cpumask *nmsk,
759f72186bfdd5 Ming Lei 2021-08-14 132 struct node_groups
*node_groups)
759f72186bfdd5 Ming Lei 2021-08-14 133 {
759f72186bfdd5 Ming Lei 2021-08-14 134 unsigned n, remaining_ncpus = 0;
759f72186bfdd5 Ming Lei 2021-08-14 135 759f72186bfdd5 Ming Lei
2021-08-14 136 for (n = 0; n < nr_node_ids; n++) {
759f72186bfdd5 Ming Lei 2021-08-14 137 node_groups[n].id = n;
759f72186bfdd5 Ming Lei 2021-08-14 138 node_groups[n].ncpus = UINT_MAX;
759f72186bfdd5 Ming Lei 2021-08-14 139 }
759f72186bfdd5 Ming Lei 2021-08-14 140 759f72186bfdd5 Ming Lei
2021-08-14 141 for_each_node_mask(n, nodemsk) {
759f72186bfdd5 Ming Lei 2021-08-14 142 unsigned ncpus;
759f72186bfdd5 Ming Lei 2021-08-14 143 759f72186bfdd5 Ming Lei
2021-08-14 144 cpumask_and(nmsk, cpu_mask, node_to_cpumask[n]);
759f72186bfdd5 Ming Lei 2021-08-14 145 ncpus = cpumask_weight(nmsk);
759f72186bfdd5 Ming Lei 2021-08-14 146 759f72186bfdd5 Ming Lei
2021-08-14 147 if (!ncpus)
759f72186bfdd5 Ming Lei 2021-08-14 148 continue;
759f72186bfdd5 Ming Lei 2021-08-14 149 remaining_ncpus += ncpus;
759f72186bfdd5 Ming Lei 2021-08-14 150 node_groups[n].ncpus = ncpus;
759f72186bfdd5 Ming Lei 2021-08-14 151 }
759f72186bfdd5 Ming Lei 2021-08-14 152 759f72186bfdd5 Ming Lei
2021-08-14 153 numgrps = min_t(unsigned, remaining_ncpus, numgrps);
759f72186bfdd5 Ming Lei 2021-08-14 154 759f72186bfdd5 Ming Lei
2021-08-14 155 sort(node_groups, nr_node_ids, sizeof(node_groups[0]),
759f72186bfdd5 Ming Lei 2021-08-14 156 ncpus_cmp_func, NULL);
759f72186bfdd5 Ming Lei 2021-08-14 157 759f72186bfdd5 Ming Lei
2021-08-14 158 /*
759f72186bfdd5 Ming Lei 2021-08-14 159 * Allocate groups for each
node according to the ratio of this
759f72186bfdd5 Ming Lei 2021-08-14 160 * node's nr_cpus to remaining
un-assigned ncpus. 'numgrps' is
759f72186bfdd5 Ming Lei 2021-08-14 161 * bigger than number of
active numa nodes. Always start the
759f72186bfdd5 Ming Lei 2021-08-14 162 * allocation from the node
with minimized nr_cpus.
759f72186bfdd5 Ming Lei 2021-08-14 163 *
759f72186bfdd5 Ming Lei 2021-08-14 164 * This way guarantees that
each active node gets allocated at
759f72186bfdd5 Ming Lei 2021-08-14 165 * least one group, and the
theory is simple: over-allocation
759f72186bfdd5 Ming Lei 2021-08-14 166 * is only done when this node
is assigned by one group, so
759f72186bfdd5 Ming Lei 2021-08-14 167 * other nodes will be
allocated >= 1 groups, since 'numgrps' is
759f72186bfdd5 Ming Lei 2021-08-14 168 * bigger than number of numa
nodes.
759f72186bfdd5 Ming Lei 2021-08-14 169 *
759f72186bfdd5 Ming Lei 2021-08-14 170 * One perfect invariant is
that number of allocated groups for
759f72186bfdd5 Ming Lei 2021-08-14 171 * each node is <= CPU count
of this node:
759f72186bfdd5 Ming Lei 2021-08-14 172 *
759f72186bfdd5 Ming Lei 2021-08-14 173 * 1) suppose there are two
nodes: A and B
759f72186bfdd5 Ming Lei 2021-08-14 174 * ncpu(X) is CPU count of node X
759f72186bfdd5 Ming Lei 2021-08-14 175 * grps(X) is the group count
allocated to node X via this
759f72186bfdd5 Ming Lei 2021-08-14 176 * algorithm
759f72186bfdd5 Ming Lei 2021-08-14 177 *
759f72186bfdd5 Ming Lei 2021-08-14 178 * ncpu(A) <= ncpu(B)
759f72186bfdd5 Ming Lei 2021-08-14 179 * ncpu(A) + ncpu(B) = N
759f72186bfdd5 Ming Lei 2021-08-14 180 * grps(A) + grps(B) = G
759f72186bfdd5 Ming Lei 2021-08-14 181 *
759f72186bfdd5 Ming Lei 2021-08-14 182 * grps(A) = max(1,
round_down(G * ncpu(A) / N))
759f72186bfdd5 Ming Lei 2021-08-14 183 * grps(B) = G - grps(A)
759f72186bfdd5 Ming Lei 2021-08-14 184 *
759f72186bfdd5 Ming Lei 2021-08-14 185 * both N and G are integer,
and 2 <= G <= N, suppose
759f72186bfdd5 Ming Lei 2021-08-14 186 * G = N - delta, and 0 <=
delta <= N - 2
759f72186bfdd5 Ming Lei 2021-08-14 187 *
759f72186bfdd5 Ming Lei 2021-08-14 188 * 2) obviously grps(A) <=
ncpu(A) because:
759f72186bfdd5 Ming Lei 2021-08-14 189 *
759f72186bfdd5 Ming Lei 2021-08-14 190 * if grps(A) is 1, then
grps(A) <= ncpu(A) given
759f72186bfdd5 Ming Lei 2021-08-14 191 * ncpu(A) >= 1
759f72186bfdd5 Ming Lei 2021-08-14 192 *
759f72186bfdd5 Ming Lei 2021-08-14 193 * otherwise,
759f72186bfdd5 Ming Lei 2021-08-14 194 * grps(A) <= G * ncpu(A) /
N <= ncpu(A), given G <= N
759f72186bfdd5 Ming Lei 2021-08-14 195 *
759f72186bfdd5 Ming Lei 2021-08-14 196 * 3) prove how grps(B) <=
ncpu(B):
759f72186bfdd5 Ming Lei 2021-08-14 197 *
759f72186bfdd5 Ming Lei 2021-08-14 198 * if round_down(G * ncpu(A)
/ N) == 0, vecs(B) won't be
759f72186bfdd5 Ming Lei 2021-08-14 199 * over-allocated, so grps(B)
<= ncpu(B),
759f72186bfdd5 Ming Lei 2021-08-14 200 *
759f72186bfdd5 Ming Lei 2021-08-14 201 * otherwise:
759f72186bfdd5 Ming Lei 2021-08-14 202 *
759f72186bfdd5 Ming Lei 2021-08-14 203 * grps(A) =
759f72186bfdd5 Ming Lei 2021-08-14 204 * round_down(G * ncpu(A) / N) =
759f72186bfdd5 Ming Lei 2021-08-14 205 * round_down((N - delta) *
ncpu(A) / N) =
759f72186bfdd5 Ming Lei 2021-08-14 206 * round_down((N * ncpu(A) -
delta * ncpu(A)) / N) >=
759f72186bfdd5 Ming Lei 2021-08-14 207 * round_down((N * ncpu(A) -
delta * N) / N) =
759f72186bfdd5 Ming Lei 2021-08-14 208 * cpu(A) - delta
759f72186bfdd5 Ming Lei 2021-08-14 209 *
759f72186bfdd5 Ming Lei 2021-08-14 210 * then:
759f72186bfdd5 Ming Lei 2021-08-14 211 *
759f72186bfdd5 Ming Lei 2021-08-14 212 * grps(A) - G >= ncpu(A) -
delta - G
759f72186bfdd5 Ming Lei 2021-08-14 213 * =>
759f72186bfdd5 Ming Lei 2021-08-14 214 * G - grps(A) <= G + delta -
ncpu(A)
759f72186bfdd5 Ming Lei 2021-08-14 215 * =>
759f72186bfdd5 Ming Lei 2021-08-14 216 * grps(B) <= N - ncpu(A)
759f72186bfdd5 Ming Lei 2021-08-14 217 * =>
759f72186bfdd5 Ming Lei 2021-08-14 218 * grps(B) <= cpu(B)
759f72186bfdd5 Ming Lei 2021-08-14 219 *
759f72186bfdd5 Ming Lei 2021-08-14 220 * For nodes >= 3, it can be
thought as one node and another big
759f72186bfdd5 Ming Lei 2021-08-14 221 * node given that is exactly
what this algorithm is implemented,
759f72186bfdd5 Ming Lei 2021-08-14 222 * and we always re-calculate
'remaining_ncpus' & 'numgrps', and
759f72186bfdd5 Ming Lei 2021-08-14 223 * finally for each node X:
grps(X) <= ncpu(X).
759f72186bfdd5 Ming Lei 2021-08-14 224 *
759f72186bfdd5 Ming Lei 2021-08-14 225 */
759f72186bfdd5 Ming Lei 2021-08-14 226 for (n = 0; n < nr_node_ids;
n++) {
759f72186bfdd5 Ming Lei 2021-08-14 227 unsigned ngroups, ncpus;
759f72186bfdd5 Ming Lei 2021-08-14 228 759f72186bfdd5 Ming Lei
2021-08-14 229 if (node_groups[n].ncpus == UINT_MAX)
759f72186bfdd5 Ming Lei 2021-08-14 230 continue;
759f72186bfdd5 Ming Lei 2021-08-14 231 759f72186bfdd5 Ming Lei
2021-08-14 232 WARN_ON_ONCE(numgrps == 0);
759f72186bfdd5 Ming Lei 2021-08-14 233 759f72186bfdd5 Ming Lei
2021-08-14 234 ncpus = node_groups[n].ncpus;
759f72186bfdd5 Ming Lei 2021-08-14 235 ngroups = max_t(unsigned, 1,
759f72186bfdd5 Ming Lei 2021-08-14 @236 numgrps * ncpus /
remaining_ncpus);
759f72186bfdd5 Ming Lei 2021-08-14 237 WARN_ON_ONCE(ngroups > ncpus);
759f72186bfdd5 Ming Lei 2021-08-14 238 759f72186bfdd5 Ming Lei
2021-08-14 239 node_groups[n].ngroups = ngroups;
759f72186bfdd5 Ming Lei 2021-08-14 240 759f72186bfdd5 Ming Lei
2021-08-14 241 remaining_ncpus -= ncpus;
759f72186bfdd5 Ming Lei 2021-08-14 242 numgrps -= ngroups;
759f72186bfdd5 Ming Lei 2021-08-14 243 }
759f72186bfdd5 Ming Lei 2021-08-14 244 }
759f72186bfdd5 Ming Lei 2021-08-14 245
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 7482/8423] sound/soc/sh/rz-ssi.c:148:15: sparse: sparse: dereference of noderef expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b9011c7e671dbbf59bb753283ddfd03f0c9eb865
commit: 03e786bd43410fa93e5d2459f7a43e90ff0ae801 [7482/8423] ASoC: sh: Add RZ/G2L SSIF-2 driver
config: arc-randconfig-s031-20210816 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 03e786bd43410fa93e5d2459f7a43e90ff0ae801
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash sound/soc/sh/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> sound/soc/sh/rz-ssi.c:148:15: sparse: sparse: dereference of noderef expression
>> sound/soc/sh/rz-ssi.c:148:15: sparse: sparse: dereference of noderef expression
>> sound/soc/sh/rz-ssi.c:317:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:317:30: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:317:30: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:335:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:335:30: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:335:30: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:338:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:338:30: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:338:30: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:340:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:340:30: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:340:30: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:343:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:343:30: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:343:30: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:359:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:359:30: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:359:30: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:432:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:432:30: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:432:30: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:488:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:488:30: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:488:30: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:524:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:524:46: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:524:46: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:546:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:546:38: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:546:38: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:562:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:562:38: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:562:38: sparse: got struct rz_ssi_priv *ssi
sound/soc/sh/rz-ssi.c:563:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rz_ssi_priv [noderef] __iomem *priv @@ got struct rz_ssi_priv *ssi @@
sound/soc/sh/rz-ssi.c:563:38: sparse: expected struct rz_ssi_priv [noderef] __iomem *priv
sound/soc/sh/rz-ssi.c:563:38: sparse: got struct rz_ssi_priv *ssi
>> sound/soc/sh/rz-ssi.c:148:15: sparse: sparse: dereference of noderef expression
>> sound/soc/sh/rz-ssi.c:148:15: sparse: sparse: dereference of noderef expression
>> sound/soc/sh/rz-ssi.c:148:15: sparse: sparse: dereference of noderef expression
sound/soc/sh/rz-ssi.c:150:9: sparse: sparse: dereference of noderef expression
sound/soc/sh/rz-ssi.c:150:9: sparse: sparse: dereference of noderef expression
vim +148 sound/soc/sh/rz-ssi.c
142
143 static void rz_ssi_reg_mask_setl(struct rz_ssi_priv __iomem *priv, uint reg,
144 u32 bclr, u32 bset)
145 {
146 u32 val;
147
> 148 val = readl(priv->base + reg);
149 val = (val & ~bclr) | bset;
150 writel(val, (priv->base + reg));
151 }
152
153 static inline struct snd_soc_dai *
154 rz_ssi_get_dai(struct snd_pcm_substream *substream)
155 {
156 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
157
158 return asoc_rtd_to_cpu(rtd, 0);
159 }
160
161 static inline bool rz_ssi_stream_is_play(struct rz_ssi_priv *ssi,
162 struct snd_pcm_substream *substream)
163 {
164 return substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
165 }
166
167 static inline struct rz_ssi_stream *
168 rz_ssi_stream_get(struct rz_ssi_priv *ssi, struct snd_pcm_substream *substream)
169 {
170 struct rz_ssi_stream *stream = &ssi->playback;
171
172 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)
173 stream = &ssi->capture;
174
175 return stream;
176 }
177
178 static int rz_ssi_stream_is_valid(struct rz_ssi_priv *ssi,
179 struct rz_ssi_stream *strm)
180 {
181 unsigned long flags;
182 int ret;
183
184 spin_lock_irqsave(&ssi->lock, flags);
185 ret = !!(strm->substream && strm->substream->runtime);
186 spin_unlock_irqrestore(&ssi->lock, flags);
187
188 return ret;
189 }
190
191 static int rz_ssi_stream_init(struct rz_ssi_priv *ssi,
192 struct rz_ssi_stream *strm,
193 struct snd_pcm_substream *substream)
194 {
195 struct snd_pcm_runtime *runtime = substream->runtime;
196
197 strm->substream = substream;
198 strm->sample_width = samples_to_bytes(runtime, 1);
199 strm->period_counter = 0;
200 strm->buffer_pos = 0;
201
202 strm->oerr_num = 0;
203 strm->uerr_num = 0;
204 strm->running = 0;
205
206 /* fifo init */
207 strm->fifo_sample_size = SSI_FIFO_DEPTH;
208
209 return 0;
210 }
211
212 static void rz_ssi_stream_quit(struct rz_ssi_priv *ssi,
213 struct rz_ssi_stream *strm)
214 {
215 struct snd_soc_dai *dai = rz_ssi_get_dai(strm->substream);
216 unsigned long flags;
217
218 spin_lock_irqsave(&ssi->lock, flags);
219 strm->substream = NULL;
220 spin_unlock_irqrestore(&ssi->lock, flags);
221
222 if (strm->oerr_num > 0)
223 dev_info(dai->dev, "overrun = %d\n", strm->oerr_num);
224
225 if (strm->uerr_num > 0)
226 dev_info(dai->dev, "underrun = %d\n", strm->uerr_num);
227 }
228
229 static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate,
230 unsigned int channels)
231 {
232 static s8 ckdv[16] = { 1, 2, 4, 8, 16, 32, 64, 128,
233 6, 12, 24, 48, 96, -1, -1, -1 };
234 unsigned int channel_bits = 32; /* System Word Length */
235 unsigned long bclk_rate = rate * channels * channel_bits;
236 unsigned int div;
237 unsigned int i;
238 u32 ssicr = 0;
239 u32 clk_ckdv;
240
241 /* Clear AUCKE so we can set MST */
242 rz_ssi_reg_writel(ssi, SSIFCR, 0);
243
244 /* Continue to output LRCK pin even when idle */
245 rz_ssi_reg_writel(ssi, SSIOFR, SSIOFR_LRCONT);
246 if (ssi->audio_clk_1 && ssi->audio_clk_2) {
247 if (ssi->audio_clk_1 % bclk_rate)
248 ssi->audio_mck = ssi->audio_clk_2;
249 else
250 ssi->audio_mck = ssi->audio_clk_1;
251 }
252
253 /* Clock setting */
254 ssicr |= SSICR_MST;
255 if (ssi->audio_mck == ssi->audio_clk_1)
256 ssicr |= SSICR_CKS;
257 if (ssi->bckp_rise)
258 ssicr |= SSICR_BCKP;
259 if (ssi->lrckp_fsync_fall)
260 ssicr |= SSICR_LRCKP;
261
262 /* Determine the clock divider */
263 clk_ckdv = 0;
264 div = ssi->audio_mck / bclk_rate;
265 /* try to find an match */
266 for (i = 0; i < ARRAY_SIZE(ckdv); i++) {
267 if (ckdv[i] == div) {
268 clk_ckdv = i;
269 break;
270 }
271 }
272
273 if (i == ARRAY_SIZE(ckdv)) {
274 dev_err(ssi->dev, "Rate not divisible by audio clock source\n");
275 return -EINVAL;
276 }
277
278 /*
279 * DWL: Data Word Length = 16 bits
280 * SWL: System Word Length = 32 bits
281 */
282 ssicr |= SSICR_CKDV(clk_ckdv);
283 ssicr |= SSICR_DWL(1) | SSICR_SWL(3);
284 rz_ssi_reg_writel(ssi, SSICR, ssicr);
285 rz_ssi_reg_writel(ssi, SSIFCR,
286 (SSIFCR_AUCKE | SSIFCR_TFRST | SSIFCR_RFRST));
287
288 return 0;
289 }
290
291 static int rz_ssi_start(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm)
292 {
293 bool is_play = rz_ssi_stream_is_play(ssi, strm->substream);
294 u32 ssicr, ssifcr;
295
296 ssicr = rz_ssi_reg_readl(ssi, SSICR);
297 ssifcr = rz_ssi_reg_readl(ssi, SSIFCR) & ~0xF;
298
299 /* FIFO interrupt thresholds */
300 rz_ssi_reg_writel(ssi, SSISCR,
301 SSISCR_TDES(strm->fifo_sample_size / 2 - 1) |
302 SSISCR_RDFS(0));
303
304 /* enable IRQ */
305 if (is_play) {
306 ssicr |= SSICR_TUIEN | SSICR_TOIEN;
307 ssifcr |= SSIFCR_TIE | SSIFCR_RFRST;
308 } else {
309 ssicr |= SSICR_RUIEN | SSICR_ROIEN;
310 ssifcr |= SSIFCR_RIE | SSIFCR_TFRST;
311 }
312
313 rz_ssi_reg_writel(ssi, SSICR, ssicr);
314 rz_ssi_reg_writel(ssi, SSIFCR, ssifcr);
315
316 /* Clear all error flags */
> 317 rz_ssi_reg_mask_setl(ssi, SSISR,
318 (SSISR_TOIRQ | SSISR_TUIRQ | SSISR_ROIRQ |
319 SSISR_RUIRQ), 0);
320
321 strm->running = 1;
322 ssicr |= is_play ? SSICR_TEN : SSICR_REN;
323 rz_ssi_reg_writel(ssi, SSICR, ssicr);
324
325 return 0;
326 }
327
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 3690/8423] drivers/gpu/drm/vc4/vc4_hdmi.c:1406:41: warning: unused variable 'vc4_hdmi_audio_widgets'
by kernel test robot
Hi Maxime,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b9011c7e671dbbf59bb753283ddfd03f0c9eb865
commit: c7d30623540b6e979d7e8647fab18feab4688808 [3690/8423] drm/vc4: hdmi: Remove unused struct
config: arm64-randconfig-r012-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1f7b25ea76a925aca690da28de9d78db7ca99d0c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout c7d30623540b6e979d7e8647fab18feab4688808
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/vc4/vc4_hdmi.c:1406:41: warning: unused variable 'vc4_hdmi_audio_widgets' [-Wunused-const-variable]
static const struct snd_soc_dapm_widget vc4_hdmi_audio_widgets[] = {
^
>> drivers/gpu/drm/vc4/vc4_hdmi.c:1410:40: warning: unused variable 'vc4_hdmi_audio_routes' [-Wunused-const-variable]
static const struct snd_soc_dapm_route vc4_hdmi_audio_routes[] = {
^
2 warnings generated.
vim +/vc4_hdmi_audio_widgets +1406 drivers/gpu/drm/vc4/vc4_hdmi.c
bb7d78568814a3 Eric Anholt 2017-02-27 1405
bb7d78568814a3 Eric Anholt 2017-02-27 @1406 static const struct snd_soc_dapm_widget vc4_hdmi_audio_widgets[] = {
bb7d78568814a3 Eric Anholt 2017-02-27 1407 SND_SOC_DAPM_OUTPUT("TX"),
bb7d78568814a3 Eric Anholt 2017-02-27 1408 };
bb7d78568814a3 Eric Anholt 2017-02-27 1409
bb7d78568814a3 Eric Anholt 2017-02-27 @1410 static const struct snd_soc_dapm_route vc4_hdmi_audio_routes[] = {
bb7d78568814a3 Eric Anholt 2017-02-27 1411 { "TX", NULL, "Playback" },
bb7d78568814a3 Eric Anholt 2017-02-27 1412 };
bb7d78568814a3 Eric Anholt 2017-02-27 1413
:::::: The code at line 1406 was first introduced by commit
:::::: bb7d78568814a31a11fa14f1479a9fe51f1582ad drm/vc4: Add HDMI audio support
:::::: TO: Eric Anholt <eric(a)anholt.net>
:::::: CC: Eric Anholt <eric(a)anholt.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH net-next 4/6] net: bridge: mcast: dump ipv4 querier state
by Dan Carpenter
Hi Nikolay,
url: https://github.com/0day-ci/linux/commits/Nikolay-Aleksandrov/net-bridge-m...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b769cf44ed55f4b277b89cf53df6092f0c9082d0
config: x86_64-randconfig-m001-20210814 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
net/bridge/br_multicast.c:2931 br_multicast_querier_state_size() warn: sizeof(NUMBER)?
vim +2931 net/bridge/br_multicast.c
384d7e0455593b Nikolay Aleksandrov 2021-08-13 2929 size_t br_multicast_querier_state_size(void)
384d7e0455593b Nikolay Aleksandrov 2021-08-13 2930 {
384d7e0455593b Nikolay Aleksandrov 2021-08-13 @2931 return nla_total_size(sizeof(0)) + /* nest attribute */
^^^^^^^^^
This looks like it's probably intentional, but wouldn't it be more
readable to say sizeof(int) as it does below?
384d7e0455593b Nikolay Aleksandrov 2021-08-13 2932 nla_total_size(sizeof(__be32)) + /* BRIDGE_QUERIER_IP_ADDRESS */
384d7e0455593b Nikolay Aleksandrov 2021-08-13 2933 nla_total_size(sizeof(int)) + /* BRIDGE_QUERIER_IP_PORT */
384d7e0455593b Nikolay Aleksandrov 2021-08-13 2934 nla_total_size_64bit(sizeof(u64)); /* BRIDGE_QUERIER_IP_OTHER_TIMER */
384d7e0455593b Nikolay Aleksandrov 2021-08-13 2935 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 5040/8423] net/ipv4/ip_sockglue.c:838:7: warning: taking address of packed member 'gf_group' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b9011c7e671dbbf59bb753283ddfd03f0c9eb865
commit: db243b796439c0caba47865564d8acd18a301d18 [5040/8423] net/ipv4/ipv6: Replace one-element arraya with flexible-array members
config: i386-randconfig-r023-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout db243b796439c0caba47865564d8acd18a301d18
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
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 >>):
clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
In file included from net/ipv4/ip_sockglue.c:19:
In file included from include/linux/module.h:14:
In file included from include/linux/buildid.h:5:
In file included from include/linux/mm_types.h:9:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from arch/x86/include/asm/preempt.h:7:
In file included from include/linux/thread_info.h:60:
arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
oldframe = __builtin_frame_address(1);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
frame = __builtin_frame_address(2);
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/ipv4/ip_sockglue.c:838:7: warning: taking address of packed member 'gf_group' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
&gf32->gf_group, gf32->gf_slist_flex);
^~~~~~~~~~~~~~
>> net/ipv4/ip_sockglue.c:1509:29: warning: taking address of packed member 'gf_fmode' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
put_user(gf.gf_fmode, &p->gf_fmode) ||
^~~~~~~~~~~
arch/x86/include/asm/uaccess.h:252:72: note: expanded from macro 'put_user'
#define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); })
^~~
arch/x86/include/asm/uaccess.h:221:24: note: expanded from macro 'do_put_user_call'
register __typeof__(*(ptr)) __val_pu asm("%"_ASM_AX); \
^~~
>> net/ipv4/ip_sockglue.c:1509:29: warning: taking address of packed member 'gf_fmode' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
put_user(gf.gf_fmode, &p->gf_fmode) ||
^~~~~~~~~~~
arch/x86/include/asm/uaccess.h:252:72: note: expanded from macro 'put_user'
#define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); })
^~~
arch/x86/include/asm/uaccess.h:230:31: note: expanded from macro 'do_put_user_call'
[size] "i" (sizeof(*(ptr))) \
^~~
>> net/ipv4/ip_sockglue.c:1510:30: warning: taking address of packed member 'gf_numsrc' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
put_user(gf.gf_numsrc, &p->gf_numsrc))
^~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:252:72: note: expanded from macro 'put_user'
#define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); })
^~~
arch/x86/include/asm/uaccess.h:221:24: note: expanded from macro 'do_put_user_call'
register __typeof__(*(ptr)) __val_pu asm("%"_ASM_AX); \
^~~
>> net/ipv4/ip_sockglue.c:1510:30: warning: taking address of packed member 'gf_numsrc' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
put_user(gf.gf_numsrc, &p->gf_numsrc))
^~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:252:72: note: expanded from macro 'put_user'
#define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); })
^~~
arch/x86/include/asm/uaccess.h:230:31: note: expanded from macro 'do_put_user_call'
[size] "i" (sizeof(*(ptr))) \
^~~
7 warnings generated.
--
clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
In file included from net/ipv6/ipv6_sockglue.c:21:
In file included from include/linux/module.h:14:
In file included from include/linux/buildid.h:5:
In file included from include/linux/mm_types.h:9:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from arch/x86/include/asm/preempt.h:7:
In file included from include/linux/thread_info.h:60:
arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
oldframe = __builtin_frame_address(1);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
frame = __builtin_frame_address(2);
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/ipv6/ipv6_sockglue.c:1111:29: warning: taking address of packed member 'gf_fmode' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
put_user(gf.gf_fmode, &p->gf_fmode) ||
^~~~~~~~~~~
arch/x86/include/asm/uaccess.h:252:72: note: expanded from macro 'put_user'
#define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); })
^~~
arch/x86/include/asm/uaccess.h:221:24: note: expanded from macro 'do_put_user_call'
register __typeof__(*(ptr)) __val_pu asm("%"_ASM_AX); \
^~~
>> net/ipv6/ipv6_sockglue.c:1111:29: warning: taking address of packed member 'gf_fmode' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
put_user(gf.gf_fmode, &p->gf_fmode) ||
^~~~~~~~~~~
arch/x86/include/asm/uaccess.h:252:72: note: expanded from macro 'put_user'
#define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); })
^~~
arch/x86/include/asm/uaccess.h:230:31: note: expanded from macro 'do_put_user_call'
[size] "i" (sizeof(*(ptr))) \
^~~
>> net/ipv6/ipv6_sockglue.c:1112:30: warning: taking address of packed member 'gf_numsrc' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
put_user(gf.gf_numsrc, &p->gf_numsrc))
^~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:252:72: note: expanded from macro 'put_user'
#define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); })
^~~
arch/x86/include/asm/uaccess.h:221:24: note: expanded from macro 'do_put_user_call'
register __typeof__(*(ptr)) __val_pu asm("%"_ASM_AX); \
^~~
>> net/ipv6/ipv6_sockglue.c:1112:30: warning: taking address of packed member 'gf_numsrc' of class or structure 'compat_group_filter::(anonymous union)::(anonymous)' may result in an unaligned pointer value [-Waddress-of-packed-member]
put_user(gf.gf_numsrc, &p->gf_numsrc))
^~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:252:72: note: expanded from macro 'put_user'
#define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); })
^~~
arch/x86/include/asm/uaccess.h:230:31: note: expanded from macro 'do_put_user_call'
[size] "i" (sizeof(*(ptr))) \
^~~
6 warnings generated.
vim +838 net/ipv4/ip_sockglue.c
799
800 static int compat_ip_set_mcast_msfilter(struct sock *sk, sockptr_t optval,
801 int optlen)
802 {
803 const int size0 = offsetof(struct compat_group_filter, gf_slist_flex);
804 struct compat_group_filter *gf32;
805 unsigned int n;
806 void *p;
807 int err;
808
809 if (optlen < size0)
810 return -EINVAL;
811 if (optlen > sysctl_optmem_max - 4)
812 return -ENOBUFS;
813
814 p = kmalloc(optlen + 4, GFP_KERNEL);
815 if (!p)
816 return -ENOMEM;
817 gf32 = p + 4; /* we want ->gf_group and ->gf_slist_flex aligned */
818
819 err = -EFAULT;
820 if (copy_from_sockptr(gf32, optval, optlen))
821 goto out_free_gsf;
822
823 /* numsrc >= (4G-140)/128 overflow in 32 bits */
824 n = gf32->gf_numsrc;
825 err = -ENOBUFS;
826 if (n >= 0x1ffffff)
827 goto out_free_gsf;
828
829 err = -EINVAL;
830 if (offsetof(struct compat_group_filter, gf_slist_flex[n]) > optlen)
831 goto out_free_gsf;
832
833 /* numsrc >= (4G-140)/128 overflow in 32 bits */
834 err = -ENOBUFS;
835 if (n > sock_net(sk)->ipv4.sysctl_igmp_max_msf)
836 goto out_free_gsf;
837 err = set_mcast_msfilter(sk, gf32->gf_interface, n, gf32->gf_fmode,
> 838 &gf32->gf_group, gf32->gf_slist_flex);
839 out_free_gsf:
840 kfree(p);
841 return err;
842 }
843
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH 7/7] blk-mq: build default queue map via group_cpus_evenly()
by kernel test robot
Hi Ming,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/irq/core]
[also build test ERROR on next-20210813]
[cannot apply to block/for-next linux/master linus/master v5.14-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ming-Lei/genirq-affinity-abstrac...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 04c2721d3530f0723b4c922a8fa9f26b202a20de
config: riscv-buildonly-randconfig-r005-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1f7b25ea76a925aca690da28de9d78db7ca99d0c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/46b1d0ed609db266f6f18e7156c4f294b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ming-Lei/genirq-affinity-abstract-new-API-from-managed-irq-affinity-spread/20210814-203741
git checkout 46b1d0ed609db266f6f18e7156c4f294bf6c4502
# 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 error/warnings (new ones prefixed by >>):
In file included from block/blk-mq-cpumap.c:13:
>> include/linux/group_cpus.h:17:26: error: implicit declaration of function 'kcalloc' [-Werror,-Wimplicit-function-declaration]
struct cpumask *masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL);
^
include/linux/group_cpus.h:17:26: note: did you mean 'kvcalloc'?
include/linux/mm.h:827:21: note: 'kvcalloc' declared here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^
In file included from block/blk-mq-cpumap.c:13:
>> include/linux/group_cpus.h:17:18: warning: incompatible integer to pointer conversion initializing 'struct cpumask *' with an expression of type 'int' [-Wint-conversion]
struct cpumask *masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from block/blk-mq-cpumap.c:15:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:8:
In file included from include/linux/genhd.h:16:
>> include/linux/slab.h:658:21: error: static declaration of 'kcalloc' follows non-static declaration
static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
^
include/linux/group_cpus.h:17:26: note: previous implicit declaration is here
struct cpumask *masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL);
^
In file included from block/blk-mq-cpumap.c:15:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:18:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
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:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from block/blk-mq-cpumap.c:15:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:18:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
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:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
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 block/blk-mq-cpumap.c:15:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:18:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
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:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
8 warnings and 2 errors generated.
vim +/kcalloc +17 include/linux/group_cpus.h
759f72186bfdd5 Ming Lei 2021-08-14 11
5cd330f089b089 Ming Lei 2021-08-14 12 #ifdef CONFIG_SMP
759f72186bfdd5 Ming Lei 2021-08-14 13 struct cpumask *group_cpus_evenly(unsigned int numgrps);
5cd330f089b089 Ming Lei 2021-08-14 14 #else
5cd330f089b089 Ming Lei 2021-08-14 15 static inline struct cpumask *group_cpus_evenly(unsigned int numgrps)
5cd330f089b089 Ming Lei 2021-08-14 16 {
5cd330f089b089 Ming Lei 2021-08-14 @17 struct cpumask *masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL);
5cd330f089b089 Ming Lei 2021-08-14 18
5cd330f089b089 Ming Lei 2021-08-14 19 if (!masks)
5cd330f089b089 Ming Lei 2021-08-14 20 return NULL;
5cd330f089b089 Ming Lei 2021-08-14 21
5cd330f089b089 Ming Lei 2021-08-14 22 /* assign all CPUs(cpu 0) to the 1st group only */
5cd330f089b089 Ming Lei 2021-08-14 23 cpumask_copy(&masks[0], cpu_possible_mask);
5cd330f089b089 Ming Lei 2021-08-14 24 return masks;
5cd330f089b089 Ming Lei 2021-08-14 25 }
5cd330f089b089 Ming Lei 2021-08-14 26 #endif
759f72186bfdd5 Ming Lei 2021-08-14 27
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month