Re: [PATCH v2 1/1] riscv: __asm_copy_to-from_user: Improve using word copy, if size is < 9*SZREG
by kernel test robot
Hi Akira,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.15 next-20211111]
[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/Akira-Tsukamoto/__asm_copy_to-fr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git debe436e77c72fcee804fb867f275e6d31aa999c
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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://github.com/0day-ci/linux/commit/cf2e8e9c4e9dc65552ca5ac0c85c19878...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akira-Tsukamoto/__asm_copy_to-from_user-Reduce-more-byte_copy/20211111-161445
git checkout cf2e8e9c4e9dc65552ca5ac0c85c198785f5d91c
# 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=riscv SHELL=/bin/bash
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/lib/uaccess.S: Assembler messages:
>> arch/riscv/lib/uaccess.S:92: Warning: zero assumed for missing expression
arch/riscv/lib/uaccess.S:94: Warning: zero assumed for missing expression
vim +92 arch/riscv/lib/uaccess.S
17
18 /* Enable access to user memory */
19 li t6, SR_SUM
20 csrs CSR_STATUS, t6
21
22 /* Save for return value */
23 mv t5, a2
24
25 /*
26 * Register allocation for code below:
27 * a0 - start of uncopied dst
28 * a1 - start of uncopied src
29 * a2 - size
30 * t0 - end of uncopied dst
31 */
32 add t0, a0, a2
33
34 /*
35 * Use byte copy only if too small.
36 * SZREG holds 4 for RV32 and 8 for RV64
37 * a3 - 2*SZREG is minimum size for word_copy
38 * 1*SZREG for aligning dst + 1*SZREG for word_copy
39 */
40 li a3, 2*SZREG
41 bltu a2, a3, .Lbyte_copy_tail
42
43 /*
44 * Copy first bytes until dst is aligned to word boundary.
45 * a0 - start of dst
46 * t1 - start of aligned dst
47 */
48 addi t1, a0, SZREG-1
49 andi t1, t1, ~(SZREG-1)
50 /* dst is already aligned, skip */
51 beq a0, t1, .Lskip_align_dst
52 1:
53 /* a5 - one byte for copying data */
54 fixup lb a5, 0(a1), 10f
55 addi a1, a1, 1 /* src */
56 fixup sb a5, 0(a0), 10f
57 addi a0, a0, 1 /* dst */
58 bltu a0, t1, 1b /* t1 - start of aligned dst */
59
60 .Lskip_align_dst:
61 /*
62 * Now dst is aligned.
63 * Use shift-copy if src is misaligned.
64 * Use word-copy if both src and dst are aligned because
65 * can not use shift-copy which do not require shifting
66 */
67 /* a1 - start of src */
68 andi a3, a1, SZREG-1
69 bnez a3, .Lshift_copy
70
71 .Lcheck_size_bulk:
72 /*
73 * Evaluate the size if possible to use unrolled.
74 * The word_copy_unlrolled requires larger than 8*SZREG
75 */
76 li a3, 8*SZREG
77 add a4, a0, a3
78 bltu a4, t0, .Lword_copy_unlrolled
79
80 .Lword_copy:
81 /*
82 * Both src and dst are aligned
83 * Not unrolled word copy with every 1*SZREG iteration
84 *
85 * a0 - start of aligned dst
86 * a1 - start of aligned src
87 * t0 - end of aligned dst
88 */
89 bgeu a0, t0, .Lbyte_copy_tail /* check if end of copy */
90 addi t0, t0, -(SZREG) /* not to over run */
91 1:
> 92 fixup REG_L a5, 0(a1)
93 addi a1, a1, SZREG
94 fixup REG_S a5, 0(a0)
95 addi a0, a0, SZREG
96 bltu a0, t0, 1b
97
98 addi t0, t0, SZREG /* revert to original value */
99 j .Lbyte_copy_tail
100
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[aegl:dsa_page_zero_prototype 17/39] drivers/dma/idxd/ktest.c:76:5: error: variable 'status' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git dsa_page_zero_prototype
head: 443bff56d346197a2f8c09c7159ebc9e7440429b
commit: 2b2a2452424b633e0ee5d2d209a949ee619a4f5c [17/39] dmaengine: idxd: add a test module for kdirect API
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git/commit/?id...
git remote add aegl https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
git fetch --no-tags aegl dsa_page_zero_prototype
git checkout 2b2a2452424b633e0ee5d2d209a949ee619a4f5c
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/dma/idxd/ktest.c: In function 'submit_memmove_operation':
>> drivers/dma/idxd/ktest.c:76:5: error: variable 'status' set but not used [-Werror=unused-but-set-variable]
76 | u8 status;
| ^~~~~~
cc1: all warnings being treated as errors
vim +/status +76 drivers/dma/idxd/ktest.c
63
64 static int submit_memmove_operation(struct dma_chan *chan,
65 struct dmatest_thread *thread,
66 struct dmatest_data *src,
67 struct dmatest_data *dst,
68 unsigned int len,
69 int timeout)
70 {
71 struct dma_device *dma = chan->device;
72 struct dmatest_done *done = &thread->test_done;
73 struct idxd_desc *desc;
74 struct dsa_hw_desc *hw;
75 struct dma_async_tx_descriptor *tx;
> 76 u8 status;
77 dma_cookie_t cookie;
78
79 desc = (struct idxd_desc *)dma->kdops.device_get_desc(chan, IDXD_OP_BLOCK);
80 if (IS_ERR(desc)) {
81 pr_warn("desc alloc failed\n");
82 return PTR_ERR(desc);
83 }
84
85 tx = &desc->txd;
86 tx->flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT;
87
88 hw = desc->hw;
89 hw->flags = IDXD_OP_FLAG_CRAV | IDXD_OP_FLAG_RCR | IDXD_OP_FLAG_RCI;
90 hw->opcode = DSA_OPCODE_MEMMOVE;
91 hw->src_addr = (u64)(src->aligned[0] + src->off);
92 hw->dst_addr = (u64)(dst->aligned[0] + dst->off);
93 hw->xfer_size = len;
94 hw->priv = 1;
95 hw->completion_addr = (u64)desc->completion;
96 /* int_handle and pasid filled by alloc_desc */
97
98 done->done = false;
99 tx->callback = idxd_ktest_callback;
100 tx->callback_param = done;
101
102 cookie = tx->tx_submit(tx);
103
104 if (dma_submit_error(cookie)) {
105 pr_warn("%s submit error!", __func__);
106 msleep(100);
107 return -ENXIO;
108 }
109
110 dma_async_issue_pending(chan);
111
112 wait_event_freezable_timeout(thread->done_wait, done->done, timeout);
113
114 status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
115
116 if (!done->done) {
117 pr_warn("%s: test timed out!", __func__);
118 return -ENXIO;
119 }
120
121 return 0;
122 }
123
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[linux-next:master 12280/13751] fs/dlm/debug_fs.c:654:15: error: 'sscanf' may overflow; destination buffer in argument 4 has size 64, but the corresponding specifier may require size 65
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f2e19fd15bd7cba347ce50be71955f5cd28a6019
commit: 5054e79de99984b4f39a073534526bc7c827b1e0 [12280/13751] fs: dlm: add lkb debugfs functionality
config: hexagon-buildonly-randconfig-r006-20211112 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 63ef0e17e28827eae53133b3467bdac7d9729318)
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 5054e79de99984b4f39a073534526bc7c827b1e0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> fs/dlm/debug_fs.c:654:15: error: 'sscanf' may overflow; destination buffer in argument 4 has size 64, but the corresponding specifier may require size 65 [-Werror,-Wfortify-source]
&lkb_id, name, &lkb_flags, &lkb_nodeid, &lkb_status);
^
1 error generated.
vim +/sscanf +654 fs/dlm/debug_fs.c
637
638 static ssize_t table_write2(struct file *file, const char __user *user_buf,
639 size_t count, loff_t *ppos)
640 {
641 struct seq_file *seq = file->private_data;
642 int n, len, lkb_nodeid, lkb_status, error;
643 char name[DLM_RESNAME_MAXLEN] = {};
644 struct dlm_ls *ls = seq->private;
645 unsigned int lkb_flags;
646 char buf[256] = {};
647 uint32_t lkb_id;
648
649 if (copy_from_user(buf, user_buf,
650 min_t(size_t, sizeof(buf) - 1, count)))
651 return -EFAULT;
652
653 n = sscanf(buf, "%x %" __stringify(DLM_RESNAME_MAXLEN) "s %x %d %d",
> 654 &lkb_id, name, &lkb_flags, &lkb_nodeid, &lkb_status);
655 if (n != 5)
656 return -EINVAL;
657
658 len = strnlen(name, DLM_RESNAME_MAXLEN);
659 error = dlm_debug_add_lkb(ls, lkb_id, name, len, lkb_flags,
660 lkb_nodeid, lkb_status);
661 if (error)
662 return error;
663
664 return count;
665 }
666
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH bpf] bpf: Make CONFIG_DEBUG_INFO_BTF depend upon CONFIG_BPF_SYSCALL
by kernel test robot
Hi Kumar,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf/master]
url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/bpf-Make...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
config: openrisc-buildonly-randconfig-r003-20211111 (attached as .config)
compiler: or1k-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://github.com/0day-ci/linux/commit/ea181ce7046ae7f916b4ede6b04c48416...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kumar-Kartikeya-Dwivedi/bpf-Make-CONFIG_DEBUG_INFO_BTF-depend-upon-CONFIG_BPF_SYSCALL/20211112-100114
git checkout ea181ce7046ae7f916b4ede6b04c48416d89b0b2
# 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=openrisc SHELL=/bin/bash kernel/bpf/
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 >>):
kernel/bpf/btf.c: In function 'btf_seq_show':
kernel/bpf/btf.c:5876:29: error: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
5876 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf.c: In function 'btf_snprintf_show':
kernel/bpf/btf.c:5913:9: error: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
5913 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
kernel/bpf/btf.c: At top level:
>> kernel/bpf/btf.c:6349:8: error: redefinition of 'struct kfunc_btf_id_list'
6349 | struct kfunc_btf_id_list {
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/bpf_verifier.h:8,
from kernel/bpf/btf.c:19:
include/linux/btf.h:275:8: note: originally defined here
275 | struct kfunc_btf_id_list {};
| ^~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6399:26: error: conflicting types for 'bpf_tcp_ca_kfunc_list'; have 'struct kfunc_btf_id_list'
6399 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/btf.c:6395:34: note: in definition of macro 'DEFINE_KFUNC_BTF_ID_LIST'
6395 | struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list), \
| ^~~~
In file included from include/linux/bpf_verifier.h:8,
from kernel/bpf/btf.c:19:
include/linux/btf.h:276:33: note: previous declaration of 'bpf_tcp_ca_kfunc_list' with type 'struct kfunc_btf_id_list'
276 | static struct kfunc_btf_id_list bpf_tcp_ca_kfunc_list __maybe_unused;
| ^~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6400:26: error: conflicting types for 'prog_test_kfunc_list'; have 'struct kfunc_btf_id_list'
6400 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
| ^~~~~~~~~~~~~~~~~~~~
kernel/bpf/btf.c:6395:34: note: in definition of macro 'DEFINE_KFUNC_BTF_ID_LIST'
6395 | struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list), \
| ^~~~
In file included from include/linux/bpf_verifier.h:8,
from kernel/bpf/btf.c:19:
include/linux/btf.h:277:33: note: previous declaration of 'prog_test_kfunc_list' with type 'struct kfunc_btf_id_list'
277 | static struct kfunc_btf_id_list prog_test_kfunc_list __maybe_unused;
| ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +6349 kernel/bpf/btf.c
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6348
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 @6349 struct kfunc_btf_id_list {
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6350 struct list_head list;
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6351 struct mutex mutex;
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6352 };
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6353
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6354 #ifdef CONFIG_DEBUG_INFO_BTF_MODULES
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6355
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6356 void register_kfunc_btf_id_set(struct kfunc_btf_id_list *l,
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6357 struct kfunc_btf_id_set *s)
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6358 {
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6359 mutex_lock(&l->mutex);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6360 list_add(&s->list, &l->list);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6361 mutex_unlock(&l->mutex);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6362 }
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6363 EXPORT_SYMBOL_GPL(register_kfunc_btf_id_set);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6364
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6365 void unregister_kfunc_btf_id_set(struct kfunc_btf_id_list *l,
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6366 struct kfunc_btf_id_set *s)
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6367 {
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6368 mutex_lock(&l->mutex);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6369 list_del_init(&s->list);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6370 mutex_unlock(&l->mutex);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6371 }
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6372 EXPORT_SYMBOL_GPL(unregister_kfunc_btf_id_set);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6373
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6374 bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id,
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6375 struct module *owner)
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6376 {
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6377 struct kfunc_btf_id_set *s;
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6378
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6379 if (!owner)
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6380 return false;
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6381 mutex_lock(&klist->mutex);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6382 list_for_each_entry(s, &klist->list, list) {
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6383 if (s->owner == owner && btf_id_set_contains(s->set, kfunc_id)) {
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6384 mutex_unlock(&klist->mutex);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6385 return true;
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6386 }
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6387 }
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6388 mutex_unlock(&klist->mutex);
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6389 return false;
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6390 }
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6391
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6392 #endif
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6393
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6394 #define DEFINE_KFUNC_BTF_ID_LIST(name) \
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6395 struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list), \
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6396 __MUTEX_INITIALIZER(name.mutex) }; \
14f267d95fe4b08 Kumar Kartikeya Dwivedi 2021-10-02 6397 EXPORT_SYMBOL_GPL(name)
0e32dfc80bae53b Kumar Kartikeya Dwivedi 2021-10-02 6398
0e32dfc80bae53b Kumar Kartikeya Dwivedi 2021-10-02 @6399 DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
c48e51c8b07aba8 Kumar Kartikeya Dwivedi 2021-10-02 @6400 DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
arch/nds32/kernel/vdso/gettimeofday.c:246:13: error: no previous prototype for '__vdso_gettimeofday'
by kernel test robot
Hi Stephen,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d2f38a3c6507b2520101f9a3807ed98f1bdc545a
commit: 20fbb11fe4ea99e02d77824613f1438bea456683 don't make the syscall checking produce errors from warnings
date: 9 weeks ago
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-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/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 20fbb11fe4ea99e02d77824613f1438bea456683
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32
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 >>):
<stdin>:1515:2: warning: #warning syscall clone3 not implemented [-Wcpp]
arch/nds32/kernel/vdso/gettimeofday.c:158:13: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes]
158 | notrace int __vdso_clock_gettime(clockid_t clkid, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~
arch/nds32/kernel/vdso/gettimeofday.c:206:13: error: no previous prototype for '__vdso_clock_getres' [-Werror=missing-prototypes]
206 | notrace int __vdso_clock_getres(clockid_t clk_id, struct __kernel_old_timespec *res)
| ^~~~~~~~~~~~~~~~~~~
>> arch/nds32/kernel/vdso/gettimeofday.c:246:13: error: no previous prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes]
246 | notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: arch/nds32/kernel/vdso/gettimeofday.o] Error 1
make[2]: Target 'include/generated/vdso-offsets.h' not remade because of errors.
make[1]: *** [arch/nds32/Makefile:63: vdso_prepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/__vdso_gettimeofday +246 arch/nds32/kernel/vdso/gettimeofday.c
eefacd1dfe38a3 Greentime Hu 2017-10-25 157
82210fc778982d Arnd Bergmann 2019-10-27 @158 notrace int __vdso_clock_gettime(clockid_t clkid, struct __kernel_old_timespec *ts)
eefacd1dfe38a3 Greentime Hu 2017-10-25 159 {
eefacd1dfe38a3 Greentime Hu 2017-10-25 160 struct vdso_data *vdata;
eefacd1dfe38a3 Greentime Hu 2017-10-25 161 int ret = -1;
eefacd1dfe38a3 Greentime Hu 2017-10-25 162
eefacd1dfe38a3 Greentime Hu 2017-10-25 163 vdata = __get_datapage();
eefacd1dfe38a3 Greentime Hu 2017-10-25 164 if (vdata->cycle_count_offset == EMPTY_REG_OFFSET)
eefacd1dfe38a3 Greentime Hu 2017-10-25 165 return clock_gettime_fallback(clkid, ts);
eefacd1dfe38a3 Greentime Hu 2017-10-25 166
eefacd1dfe38a3 Greentime Hu 2017-10-25 167 switch (clkid) {
eefacd1dfe38a3 Greentime Hu 2017-10-25 168 case CLOCK_REALTIME_COARSE:
eefacd1dfe38a3 Greentime Hu 2017-10-25 169 ret = do_realtime_coarse(ts, vdata);
eefacd1dfe38a3 Greentime Hu 2017-10-25 170 break;
eefacd1dfe38a3 Greentime Hu 2017-10-25 171 case CLOCK_MONOTONIC_COARSE:
eefacd1dfe38a3 Greentime Hu 2017-10-25 172 ret = do_monotonic_coarse(ts, vdata);
eefacd1dfe38a3 Greentime Hu 2017-10-25 173 break;
eefacd1dfe38a3 Greentime Hu 2017-10-25 174 case CLOCK_REALTIME:
eefacd1dfe38a3 Greentime Hu 2017-10-25 175 ret = do_realtime(ts, vdata);
eefacd1dfe38a3 Greentime Hu 2017-10-25 176 break;
eefacd1dfe38a3 Greentime Hu 2017-10-25 177 case CLOCK_MONOTONIC:
eefacd1dfe38a3 Greentime Hu 2017-10-25 178 ret = do_monotonic(ts, vdata);
eefacd1dfe38a3 Greentime Hu 2017-10-25 179 break;
eefacd1dfe38a3 Greentime Hu 2017-10-25 180 default:
eefacd1dfe38a3 Greentime Hu 2017-10-25 181 break;
eefacd1dfe38a3 Greentime Hu 2017-10-25 182 }
eefacd1dfe38a3 Greentime Hu 2017-10-25 183
eefacd1dfe38a3 Greentime Hu 2017-10-25 184 if (ret)
eefacd1dfe38a3 Greentime Hu 2017-10-25 185 ret = clock_gettime_fallback(clkid, ts);
eefacd1dfe38a3 Greentime Hu 2017-10-25 186
eefacd1dfe38a3 Greentime Hu 2017-10-25 187 return ret;
eefacd1dfe38a3 Greentime Hu 2017-10-25 188 }
eefacd1dfe38a3 Greentime Hu 2017-10-25 189
eefacd1dfe38a3 Greentime Hu 2017-10-25 190 static notrace int clock_getres_fallback(clockid_t _clk_id,
82210fc778982d Arnd Bergmann 2019-10-27 191 struct __kernel_old_timespec *_res)
eefacd1dfe38a3 Greentime Hu 2017-10-25 192 {
eefacd1dfe38a3 Greentime Hu 2017-10-25 193 register clockid_t clk_id asm("$r0") = _clk_id;
82210fc778982d Arnd Bergmann 2019-10-27 194 register struct __kernel_old_timespec *res asm("$r1") = _res;
eefacd1dfe38a3 Greentime Hu 2017-10-25 195 register int ret asm("$r0");
eefacd1dfe38a3 Greentime Hu 2017-10-25 196
eefacd1dfe38a3 Greentime Hu 2017-10-25 197 asm volatile ("movi $r15, %3\n"
eefacd1dfe38a3 Greentime Hu 2017-10-25 198 "syscall 0x0\n"
eefacd1dfe38a3 Greentime Hu 2017-10-25 199 :"=r" (ret)
eefacd1dfe38a3 Greentime Hu 2017-10-25 200 :"r"(clk_id), "r"(res), "i"(__NR_clock_getres)
eefacd1dfe38a3 Greentime Hu 2017-10-25 201 :"$r15", "memory");
eefacd1dfe38a3 Greentime Hu 2017-10-25 202
eefacd1dfe38a3 Greentime Hu 2017-10-25 203 return ret;
eefacd1dfe38a3 Greentime Hu 2017-10-25 204 }
eefacd1dfe38a3 Greentime Hu 2017-10-25 205
82210fc778982d Arnd Bergmann 2019-10-27 206 notrace int __vdso_clock_getres(clockid_t clk_id, struct __kernel_old_timespec *res)
eefacd1dfe38a3 Greentime Hu 2017-10-25 207 {
af9abd65983cf3 Vincenzo Frascino 2019-04-01 208 struct vdso_data *vdata = __get_datapage();
af9abd65983cf3 Vincenzo Frascino 2019-04-01 209
eefacd1dfe38a3 Greentime Hu 2017-10-25 210 if (res == NULL)
eefacd1dfe38a3 Greentime Hu 2017-10-25 211 return 0;
eefacd1dfe38a3 Greentime Hu 2017-10-25 212 switch (clk_id) {
eefacd1dfe38a3 Greentime Hu 2017-10-25 213 case CLOCK_REALTIME:
eefacd1dfe38a3 Greentime Hu 2017-10-25 214 case CLOCK_MONOTONIC:
eefacd1dfe38a3 Greentime Hu 2017-10-25 215 case CLOCK_MONOTONIC_RAW:
eefacd1dfe38a3 Greentime Hu 2017-10-25 216 res->tv_sec = 0;
af9abd65983cf3 Vincenzo Frascino 2019-04-01 217 res->tv_nsec = vdata->hrtimer_res;
eefacd1dfe38a3 Greentime Hu 2017-10-25 218 break;
eefacd1dfe38a3 Greentime Hu 2017-10-25 219 case CLOCK_REALTIME_COARSE:
eefacd1dfe38a3 Greentime Hu 2017-10-25 220 case CLOCK_MONOTONIC_COARSE:
eefacd1dfe38a3 Greentime Hu 2017-10-25 221 res->tv_sec = 0;
eefacd1dfe38a3 Greentime Hu 2017-10-25 222 res->tv_nsec = CLOCK_COARSE_RES;
eefacd1dfe38a3 Greentime Hu 2017-10-25 223 break;
eefacd1dfe38a3 Greentime Hu 2017-10-25 224 default:
eefacd1dfe38a3 Greentime Hu 2017-10-25 225 return clock_getres_fallback(clk_id, res);
eefacd1dfe38a3 Greentime Hu 2017-10-25 226 }
eefacd1dfe38a3 Greentime Hu 2017-10-25 227 return 0;
eefacd1dfe38a3 Greentime Hu 2017-10-25 228 }
eefacd1dfe38a3 Greentime Hu 2017-10-25 229
ddccf40fe82b7a Arnd Bergmann 2017-11-23 230 static notrace inline int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
eefacd1dfe38a3 Greentime Hu 2017-10-25 231 struct timezone *_tz)
eefacd1dfe38a3 Greentime Hu 2017-10-25 232 {
ddccf40fe82b7a Arnd Bergmann 2017-11-23 233 register struct __kernel_old_timeval *tv asm("$r0") = _tv;
eefacd1dfe38a3 Greentime Hu 2017-10-25 234 register struct timezone *tz asm("$r1") = _tz;
eefacd1dfe38a3 Greentime Hu 2017-10-25 235 register int ret asm("$r0");
eefacd1dfe38a3 Greentime Hu 2017-10-25 236
eefacd1dfe38a3 Greentime Hu 2017-10-25 237 asm volatile ("movi $r15, %3\n"
eefacd1dfe38a3 Greentime Hu 2017-10-25 238 "syscall 0x0\n"
eefacd1dfe38a3 Greentime Hu 2017-10-25 239 :"=r" (ret)
eefacd1dfe38a3 Greentime Hu 2017-10-25 240 :"r"(tv), "r"(tz), "i"(__NR_gettimeofday)
eefacd1dfe38a3 Greentime Hu 2017-10-25 241 :"$r15", "memory");
eefacd1dfe38a3 Greentime Hu 2017-10-25 242
eefacd1dfe38a3 Greentime Hu 2017-10-25 243 return ret;
eefacd1dfe38a3 Greentime Hu 2017-10-25 244 }
eefacd1dfe38a3 Greentime Hu 2017-10-25 245
ddccf40fe82b7a Arnd Bergmann 2017-11-23 @246 notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
:::::: The code at line 246 was first introduced by commit
:::::: ddccf40fe82b7ac7c44b186ec4b6d1d1bbc2cbff y2038: vdso: change timeval to __kernel_old_timeval
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Arnd Bergmann <arnd(a)arndb.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH v4] Add payload to be 32-bit aligned to fix dropped packets
by kernel test robot
Hi Kumar,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.15 next-20211111]
[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/Kumar-Thangavel/Add-payload-to-b...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cb690f5238d71f543f4ce874aa59237cf53a877c
config: hexagon-buildonly-randconfig-r006-20211112 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 63ef0e17e28827eae53133b3467bdac7d9729318)
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/263eaf647698f405f4f9905c947bf73b8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kumar-Thangavel/Add-payload-to-be-32-bit-aligned-to-fix-dropped-packets/20211110-175537
git checkout 263eaf647698f405f4f9905c947bf73b87c55b79
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
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/ncsi/ncsi-cmd.c:225:9: error: comparison of distinct pointer types ('typeof (payload) *' (aka 'unsigned short *') and 'typeof (26) *' (aka 'int *')) [-Werror,-Wcompare-distinct-pointer-types]
len += max(payload, 26);
^~~~~~~~~~~~~~~~
include/linux/minmax.h:52:19: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(x, y, >)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 error generated.
vim +225 net/ncsi/ncsi-cmd.c
210
211 static int ncsi_cmd_handler_oem(struct sk_buff *skb,
212 struct ncsi_cmd_arg *nca)
213 {
214 struct ncsi_cmd_oem_pkt *cmd;
215 unsigned int len;
216 /* NC-SI spec DSP_0222_1.2.0, section 8.2.2.2
217 * requires payload to be padded with 0 to
218 * 32-bit boundary before the checksum field.
219 * Ensure the padding bytes are accounted for in
220 * skb allocation
221 */
222
223 unsigned short payload = ALIGN(nca->payload, 4);
224 len = sizeof(struct ncsi_cmd_pkt_hdr) + 4;
> 225 len += max(payload, 26);
226
227 cmd = skb_put_zero(skb, len);
228 memcpy(&cmd->mfr_id, nca->data, nca->payload);
229 ncsi_cmd_build_header(&cmd->cmd.common, nca);
230
231 return 0;
232 }
233
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[ti:ti-rt-linux-5.10.y 10173/10194] drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:159:17: error: implicit declaration of function 'vunmap'; did you mean 'iounmap'?
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: aafb1bd67f22b44cf5f8072266002696adaa21b0
commit: 97dfdd999ba7266785579c99c40a3c65e63e864a [10173/10194] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile
config: mips-allmodconfig (attached as .config)
compiler: mips-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
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout 97dfdd999ba7266785579c99c40a3c65e63e864a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 error/warnings (new ones prefixed by >>):
drivers/media/platform/vxe-vxd/decoder/vxd_core.c: In function 'stream_worker':
>> drivers/media/platform/vxe-vxd/decoder/vxd_core.c:550:25: warning: variable 'vxd' set but not used [-Wunused-but-set-variable]
550 | struct vxd_dev *vxd = NULL;
| ^~~
--
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:15:
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c: In function '_img_mem_alloc':
>> drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:291:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
291 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:129:29: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:9: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:291:9: note: in expansion of macro 'dev_dbg'
291 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
| ^~~~~~~
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:291:81: note: format string is defined here
291 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
| ~~^
| |
| unsigned int
| %lu
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:15:
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c: In function 'img_mem_alloc':
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:310:25: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'long unsigned int' [-Wformat=]
310 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:129:29: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:9: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:310:9: note: in expansion of macro 'dev_dbg'
310 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
| ^~~~~~~
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:310:51: note: format string is defined here
310 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
| ~~^
| |
| unsigned int
| %lu
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:15:
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:334:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
334 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:129:29: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:9: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:334:9: note: in expansion of macro 'dev_dbg'
334 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
| ^~~~~~~
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:334:74: note: format string is defined here
334 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
| ~~^
| |
| unsigned int
| %lu
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:15:
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c: In function '_img_mem_import':
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:373:25: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'long unsigned int' [-Wformat=]
373 | dev_dbg(device, "%s ctx %p created buffer %d (%p) actual_size %zu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:129:29: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:9: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
--
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c: In function 'unified_free':
>> drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:159:17: error: implicit declaration of function 'vunmap'; did you mean 'iounmap'? [-Werror=implicit-function-declaration]
159 | vunmap(buffer->kptr);
| ^~~~~~
| iounmap
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c: In function 'unified_map_km':
>> drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:197:24: error: implicit declaration of function 'vmap'; did you mean 'bmap'? [-Werror=implicit-function-declaration]
197 | buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
| ^~~~
| bmap
>> drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:197:63: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MTE'?
197 | buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
| ^~~~~~
| VM_MTE
drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:197:63: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
--
drivers/media/platform/vxe-vxd/decoder/../common/work_queue.c: In function 'get_delayed_work_buff':
>> drivers/media/platform/vxe-vxd/decoder/../common/work_queue.c:148:22: warning: variable 'previous' set but not used [-Wunused-but-set-variable]
148 | struct node *previous = NULL;
| ^~~~~~~~
--
drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c: In function 'vxd_dec_buf_prepare':
>> drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:36: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
714 | new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
| ^~~~~~~~~~~~
| pfn_to_page
>> drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:34: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
714 | new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
| ^
>> drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:620:13: warning: variable 'pages' set but not used [-Wunused-but-set-variable]
620 | int pages;
| ^~~~~
In file included from drivers/media/platform/vxe-vxd/decoder/vxd_props.h:19,
from drivers/media/platform/vxe-vxd/decoder/decoder.h:29,
from drivers/media/platform/vxe-vxd/decoder/core.h:20,
from drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:53:
At top level:
drivers/media/platform/vxe-vxd/common/imgmmu.h:65:28: warning: 'VIRT_DIR_IDX_MASK' defined but not used [-Wunused-const-variable=]
65 | static const unsigned long VIRT_DIR_IDX_MASK = (~((1 << MMU_DIR_SHIFT) - 1));
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/vxe-vxd/common/imgmmu.h:62:28: warning: 'VIRT_PAGE_TBL_MASK' defined but not used [-Wunused-const-variable=]
62 | static const unsigned long VIRT_PAGE_TBL_MASK =
| ^~~~~~~~~~~~~~~~~~
drivers/media/platform/vxe-vxd/common/imgmmu.h:60:28: warning: 'VIRT_PAGE_OFF_MASK' defined but not used [-Wunused-const-variable=]
60 | static const unsigned long VIRT_PAGE_OFF_MASK = ((1 << MMU_PAGE_SHIFT) - 1);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/media/platform/vxe-vxd/decoder/hevc_secure_parser.c: In function 'bspp_hevc_parse_vps':
>> drivers/media/platform/vxe-vxd/decoder/hevc_secure_parser.c:594:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
594 | }
| ^
--
>> drivers/media/platform/vxe-vxd/decoder/jpeg_secure_parser.c:596:5: warning: no previous prototype for 'bspp_jpeg_unit_parser' [-Wmissing-prototypes]
596 | int bspp_jpeg_unit_parser(void *swsr_ctx, struct bspp_unit_data *unit_data)
| ^~~~~~~~~~~~~~~~~~~~~
vim +159 drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c
b738db9eda05d06 Sidraya 2021-11-02 145
b738db9eda05d06 Sidraya 2021-11-02 146 static void unified_free(struct heap *heap, struct buffer *buffer)
b738db9eda05d06 Sidraya 2021-11-02 147 {
b738db9eda05d06 Sidraya 2021-11-02 148 void *dev = buffer->device;
b738db9eda05d06 Sidraya 2021-11-02 149 void *sgt = buffer->priv;
b738db9eda05d06 Sidraya 2021-11-02 150 void *sgl;
b738db9eda05d06 Sidraya 2021-11-02 151
b738db9eda05d06 Sidraya 2021-11-02 152 dev_dbg(dev, "%s:%d buffer %d (0x%p)\n", __func__, __LINE__,
b738db9eda05d06 Sidraya 2021-11-02 153 buffer->id, buffer);
b738db9eda05d06 Sidraya 2021-11-02 154
b738db9eda05d06 Sidraya 2021-11-02 155 if (buffer->kptr) {
b738db9eda05d06 Sidraya 2021-11-02 156 dev_dbg(dev, "%s vunmap 0x%p\n", __func__, buffer->kptr);
b738db9eda05d06 Sidraya 2021-11-02 157 dma_unmap_sg(dev, img_mmu_get_sgl(sgt), img_mmu_get_orig_nents(sgt),
b738db9eda05d06 Sidraya 2021-11-02 158 DMA_FROM_DEVICE);
b738db9eda05d06 Sidraya 2021-11-02 @159 vunmap(buffer->kptr);
b738db9eda05d06 Sidraya 2021-11-02 160 }
b738db9eda05d06 Sidraya 2021-11-02 161
b738db9eda05d06 Sidraya 2021-11-02 162 sgl = img_mmu_get_sgl(sgt);
b738db9eda05d06 Sidraya 2021-11-02 163 while (sgl) {
b738db9eda05d06 Sidraya 2021-11-02 164 __free_page(sg_page(sgl));
b738db9eda05d06 Sidraya 2021-11-02 165 sgl = sg_next(sgl);
b738db9eda05d06 Sidraya 2021-11-02 166 }
b738db9eda05d06 Sidraya 2021-11-02 167 sg_free_table(sgt);
b738db9eda05d06 Sidraya 2021-11-02 168 kfree(sgt);
b738db9eda05d06 Sidraya 2021-11-02 169 }
b738db9eda05d06 Sidraya 2021-11-02 170
b738db9eda05d06 Sidraya 2021-11-02 171 static int unified_map_km(struct heap *heap, struct buffer *buffer)
b738db9eda05d06 Sidraya 2021-11-02 172 {
b738db9eda05d06 Sidraya 2021-11-02 173 void *dev = buffer->device;
b738db9eda05d06 Sidraya 2021-11-02 174 void *sgt = buffer->priv;
b738db9eda05d06 Sidraya 2021-11-02 175 void *sgl = img_mmu_get_sgl(sgt);
b738db9eda05d06 Sidraya 2021-11-02 176 unsigned int num_pages = sg_nents(sgl);
b738db9eda05d06 Sidraya 2021-11-02 177 unsigned int orig_nents = img_mmu_get_orig_nents(sgt);
b738db9eda05d06 Sidraya 2021-11-02 178 void **pages;
b738db9eda05d06 Sidraya 2021-11-02 179 int ret;
b738db9eda05d06 Sidraya 2021-11-02 180 pgprot_t prot;
b738db9eda05d06 Sidraya 2021-11-02 181
b738db9eda05d06 Sidraya 2021-11-02 182 dev_dbg(dev, "%s:%d buffer %d (0x%p)\n", __func__, __LINE__, buffer->id, buffer);
b738db9eda05d06 Sidraya 2021-11-02 183
b738db9eda05d06 Sidraya 2021-11-02 184 if (buffer->kptr) {
b738db9eda05d06 Sidraya 2021-11-02 185 dev_warn(dev, "%s called for already mapped buffer %d\n", __func__, buffer->id);
b738db9eda05d06 Sidraya 2021-11-02 186 return 0;
b738db9eda05d06 Sidraya 2021-11-02 187 }
b738db9eda05d06 Sidraya 2021-11-02 188
b738db9eda05d06 Sidraya 2021-11-02 189 pages = kmalloc_array(num_pages, sizeof(void *), GFP_KERNEL);
b738db9eda05d06 Sidraya 2021-11-02 190 if (!pages)
b738db9eda05d06 Sidraya 2021-11-02 191 return -ENOMEM;
b738db9eda05d06 Sidraya 2021-11-02 192
b738db9eda05d06 Sidraya 2021-11-02 193 img_mmu_get_pages(pages, sgt);
b738db9eda05d06 Sidraya 2021-11-02 194
b738db9eda05d06 Sidraya 2021-11-02 195 prot = PAGE_KERNEL;
b738db9eda05d06 Sidraya 2021-11-02 196 prot = pgprot_writecombine(prot);
b738db9eda05d06 Sidraya 2021-11-02 @197 buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
b738db9eda05d06 Sidraya 2021-11-02 198 kfree(pages);
b738db9eda05d06 Sidraya 2021-11-02 199 if (!buffer->kptr) {
b738db9eda05d06 Sidraya 2021-11-02 200 dev_err(dev, "%s vmap failed!\n", __func__);
b738db9eda05d06 Sidraya 2021-11-02 201 return -EFAULT;
b738db9eda05d06 Sidraya 2021-11-02 202 }
b738db9eda05d06 Sidraya 2021-11-02 203
b738db9eda05d06 Sidraya 2021-11-02 204 ret = dma_map_sg(dev, sgl, orig_nents, DMA_FROM_DEVICE);
b738db9eda05d06 Sidraya 2021-11-02 205
b738db9eda05d06 Sidraya 2021-11-02 206 if (ret <= 0) {
b738db9eda05d06 Sidraya 2021-11-02 207 dev_err(dev, "%s dma_map_sg failed!\n", __func__);
b738db9eda05d06 Sidraya 2021-11-02 208 vunmap(buffer->kptr);
b738db9eda05d06 Sidraya 2021-11-02 209 return -EFAULT;
b738db9eda05d06 Sidraya 2021-11-02 210 }
b738db9eda05d06 Sidraya 2021-11-02 211 dev_dbg(dev, "%s:%d buffer %d orig_nents %d nents %d\n", __func__,
b738db9eda05d06 Sidraya 2021-11-02 212 __LINE__, buffer->id, orig_nents, ret);
b738db9eda05d06 Sidraya 2021-11-02 213
b738db9eda05d06 Sidraya 2021-11-02 214 img_mmu_set_sgt_nents(sgt, ret);
b738db9eda05d06 Sidraya 2021-11-02 215
b738db9eda05d06 Sidraya 2021-11-02 216 dev_dbg(dev, "%s:%d buffer %d vmap to 0x%p\n", __func__, __LINE__,
b738db9eda05d06 Sidraya 2021-11-02 217 buffer->id, buffer->kptr);
b738db9eda05d06 Sidraya 2021-11-02 218
b738db9eda05d06 Sidraya 2021-11-02 219 return 0;
b738db9eda05d06 Sidraya 2021-11-02 220 }
b738db9eda05d06 Sidraya 2021-11-02 221
:::::: The code at line 159 was first introduced by commit
:::::: b738db9eda05d068022ccbfbba25f5f0a0a09eaa v4l: vxd-dec: Create vxd_dec Mem Manager helper library
:::::: TO: Sidraya <sidraya.bj(a)pathpartnertech.com>
:::::: CC: Praneeth Bajjuri <praneeth(a)ti.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH V1 3/3] rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support
by kernel test robot
Hi Deepak,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.15]
[cannot apply to next-20211108]
[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/Deepak-Kumar-Singh/rpmsg-core-Ad...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 02d5e016800d082058b3d3b7c3ede136cdc6ddcb
config: x86_64-randconfig-c007-20211001 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 962e503cc8bc411f7523cc393acae8aae425b1c4)
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/706239528659b90d79d28e52fcd053874...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Deepak-Kumar-Singh/rpmsg-core-Add-signal-API-support/20211001-003225
git checkout 706239528659b90d79d28e52fcd0538747e66a86
# 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 >>)
>> drivers/rpmsg/rpmsg_char.c:310:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = put_user(eptdev->rsigs, (int __user *)arg);
^
drivers/rpmsg/rpmsg_char.c:317:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = rpmsg_set_flow_control(eptdev->ept, set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/rpmsg/rpmsg_char.c:320:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = rpmsg_eptdev_destroy(&eptdev->dev, NULL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/rpmsg/rpmsg_char.c:323:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EINVAL;
^ ~~~~~~~
vim +/ret +310 drivers/rpmsg/rpmsg_char.c
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 295
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 296 static long rpmsg_eptdev_ioctl(struct file *fp, unsigned int cmd,
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 297 unsigned long arg)
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 298 {
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 299 struct rpmsg_eptdev *eptdev = fp->private_data;
706239528659b90 Deepak Kumar Singh 2021-09-30 300 bool set;
706239528659b90 Deepak Kumar Singh 2021-09-30 301 u32 val;
706239528659b90 Deepak Kumar Singh 2021-09-30 302 int ret;
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 303
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 304 if (cmd != RPMSG_DESTROY_EPT_IOCTL)
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 305 return -EINVAL;
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 306
706239528659b90 Deepak Kumar Singh 2021-09-30 307 switch (cmd) {
706239528659b90 Deepak Kumar Singh 2021-09-30 308 case TIOCMGET:
706239528659b90 Deepak Kumar Singh 2021-09-30 309 eptdev->sig_pending = false;
706239528659b90 Deepak Kumar Singh 2021-09-30 @310 ret = put_user(eptdev->rsigs, (int __user *)arg);
706239528659b90 Deepak Kumar Singh 2021-09-30 311 break;
706239528659b90 Deepak Kumar Singh 2021-09-30 312 case TIOCMSET:
706239528659b90 Deepak Kumar Singh 2021-09-30 313 ret = get_user(val, (int __user *)arg);
706239528659b90 Deepak Kumar Singh 2021-09-30 314 if (ret)
706239528659b90 Deepak Kumar Singh 2021-09-30 315 break;
706239528659b90 Deepak Kumar Singh 2021-09-30 316 set = (val & TIOCM_DTR) ? true : false;
706239528659b90 Deepak Kumar Singh 2021-09-30 @317 ret = rpmsg_set_flow_control(eptdev->ept, set);
706239528659b90 Deepak Kumar Singh 2021-09-30 318 break;
706239528659b90 Deepak Kumar Singh 2021-09-30 319 case RPMSG_DESTROY_EPT_IOCTL:
706239528659b90 Deepak Kumar Singh 2021-09-30 @320 ret = rpmsg_eptdev_destroy(&eptdev->dev, NULL);
706239528659b90 Deepak Kumar Singh 2021-09-30 321 break;
706239528659b90 Deepak Kumar Singh 2021-09-30 322 default:
706239528659b90 Deepak Kumar Singh 2021-09-30 @323 ret = -EINVAL;
706239528659b90 Deepak Kumar Singh 2021-09-30 324 }
706239528659b90 Deepak Kumar Singh 2021-09-30 325
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 326 return rpmsg_eptdev_destroy(&eptdev->dev, NULL);
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 327 }
c0cdc19f84a4712 Bjorn Andersson 2017-01-11 328
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH v3 1/4] mm/shmem: support deterministic charging of tmpfs
by kernel test robot
Hi Mina,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on hnaz-mm/master]
url: https://github.com/0day-ci/linux/commits/Mina-Almasry/mm-shmem-support-de...
base: https://github.com/hnaz/linux-mm master
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/51d8c281f9e96cc0269902e4597a972c7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mina-Almasry/mm-shmem-support-deterministic-charging-of-tmpfs/20211112-084506
git checkout 51d8c281f9e96cc0269902e4597a972c7e2510f0
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=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 >>):
fs/super.c: In function 'destroy_unused_super':
>> fs/super.c:184:5: warning: "CONFIG_MEMCG" is not defined, evaluates to 0 [-Wundef]
184 | #if CONFIG_MEMCG
| ^~~~~~~~~~~~
fs/super.c: In function '__put_super':
fs/super.c:299:5: warning: "CONFIG_MEMCG" is not defined, evaluates to 0 [-Wundef]
299 | #if CONFIG_MEMCG
| ^~~~~~~~~~~~
vim +/CONFIG_MEMCG +184 fs/super.c
175
176 /* Free a superblock that has never been seen by anyone */
177 static void destroy_unused_super(struct super_block *s)
178 {
179 if (!s)
180 return;
181 up_write(&s->s_umount);
182 list_lru_destroy(&s->s_dentry_lru);
183 list_lru_destroy(&s->s_inode_lru);
> 184 #if CONFIG_MEMCG
185 mem_cgroup_set_charge_target(&s->s_memcg_to_charge, NULL);
186 #endif
187 security_sb_free(s);
188 put_user_ns(s->s_user_ns);
189 kfree(s->s_subtype);
190 free_prealloced_shrinker(&s->s_shrink);
191 /* no delays needed */
192 destroy_super_work(&s->destroy_work);
193 }
194
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week