[linux-next:master 9149/9522] mm/slub.c:2723:16: error: implicit declaration of function 'try_pfmemalloc_match'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
commit: 10c9a9b135c1dfc6a110d503b68c4e0ba8f4ca26 [9149/9522] mm, slub: prevent VM_BUG_ON in PageSlabPfmemalloc from ___slab_alloc
config: x86_64-randconfig-a002-20210817 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a83d99c55ebb14532c414066a5aa3bdb65389965)
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 10c9a9b135c1dfc6a110d503b68c4e0ba8f4ca26
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the linux-next/master HEAD 86ed57fd8c93fdfaabb4f58e78455180fa7d8a84 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
>> mm/slub.c:2723:16: error: implicit declaration of function 'try_pfmemalloc_match' [-Werror,-Wimplicit-function-declaration]
if (unlikely(!try_pfmemalloc_match(page, gfpflags)))
^
mm/slub.c:2723:16: note: did you mean 'pfmemalloc_match'?
mm/slub.c:2601:20: note: 'pfmemalloc_match' declared here
static inline bool pfmemalloc_match(struct page *page, gfp_t gfpflags)
^
1 error generated.
vim +/try_pfmemalloc_match +2723 mm/slub.c
2655
2656 /*
2657 * Slow path. The lockless freelist is empty or we need to perform
2658 * debugging duties.
2659 *
2660 * Processing is still very fast if new objects have been freed to the
2661 * regular freelist. In that case we simply take over the regular freelist
2662 * as the lockless freelist and zap the regular freelist.
2663 *
2664 * If that is not working then we fall back to the partial lists. We take the
2665 * first element of the freelist as the object to allocate now and move the
2666 * rest of the freelist to the lockless freelist.
2667 *
2668 * And if we were unable to get a new slab from the partial slab lists then
2669 * we need to allocate a new slab. This is the slowest path since it involves
2670 * a call to the page allocator and the setup of a new slab.
2671 *
2672 * Version of __slab_alloc to use when we know that preemption is
2673 * already disabled (which is the case for bulk allocation).
2674 */
2675 static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
2676 unsigned long addr, struct kmem_cache_cpu *c)
2677 {
2678 void *freelist;
2679 struct page *page;
2680 unsigned long flags;
2681
2682 stat(s, ALLOC_SLOWPATH);
2683
2684 reread_page:
2685
2686 page = READ_ONCE(c->page);
2687 if (!page) {
2688 /*
2689 * if the node is not online or has no normal memory, just
2690 * ignore the node constraint
2691 */
2692 if (unlikely(node != NUMA_NO_NODE &&
2693 !node_isset(node, slab_nodes)))
2694 node = NUMA_NO_NODE;
2695 local_irq_save(flags);
2696 if (unlikely(c->page)) {
2697 local_irq_restore(flags);
2698 goto reread_page;
2699 }
2700 goto new_slab;
2701 }
2702 redo:
2703
2704 if (unlikely(!node_match(page, node))) {
2705 /*
2706 * same as above but node_match() being false already
2707 * implies node != NUMA_NO_NODE
2708 */
2709 if (!node_isset(node, slab_nodes)) {
2710 node = NUMA_NO_NODE;
2711 goto redo;
2712 } else {
2713 stat(s, ALLOC_NODE_MISMATCH);
2714 goto deactivate_slab;
2715 }
2716 }
2717
2718 /*
2719 * By rights, we should be searching for a slab page that was
2720 * PFMEMALLOC but right now, we are losing the pfmemalloc
2721 * information when the page leaves the per-cpu allocator
2722 */
> 2723 if (unlikely(!try_pfmemalloc_match(page, gfpflags)))
2724 goto deactivate_slab;
2725
2726 /* must check again c->page in case IRQ handler changed it */
2727 local_irq_save(flags);
2728 if (unlikely(page != c->page)) {
2729 local_irq_restore(flags);
2730 goto reread_page;
2731 }
2732 freelist = c->freelist;
2733 if (freelist)
2734 goto load_freelist;
2735
2736 freelist = get_freelist(s, page);
2737
2738 if (!freelist) {
2739 c->page = NULL;
2740 stat(s, DEACTIVATE_BYPASS);
2741 goto new_slab;
2742 }
2743
2744 stat(s, ALLOC_REFILL);
2745
2746 load_freelist:
2747
2748 lockdep_assert_irqs_disabled();
2749
2750 /*
2751 * freelist is pointing to the list of objects to be used.
2752 * page is pointing to the page from which the objects are obtained.
2753 * That page must be frozen for per cpu allocations to work.
2754 */
2755 VM_BUG_ON(!c->page->frozen);
2756 c->freelist = get_freepointer(s, freelist);
2757 c->tid = next_tid(c->tid);
2758 local_irq_restore(flags);
2759 return freelist;
2760
2761 deactivate_slab:
2762
2763 local_irq_save(flags);
2764 if (page != c->page) {
2765 local_irq_restore(flags);
2766 goto reread_page;
2767 }
2768 deactivate_slab(s, page, c->freelist, c);
2769
2770 new_slab:
2771
2772 lockdep_assert_irqs_disabled();
2773
2774 if (slub_percpu_partial(c)) {
2775 page = c->page = slub_percpu_partial(c);
2776 slub_set_percpu_partial(c, page);
2777 local_irq_restore(flags);
2778 stat(s, CPU_PARTIAL_ALLOC);
2779 goto redo;
2780 }
2781
2782 freelist = get_partial(s, gfpflags, node, &page);
2783 if (freelist) {
2784 c->page = page;
2785 goto check_new_page;
2786 }
2787
2788 put_cpu_ptr(s->cpu_slab);
2789 page = new_slab(s, gfpflags, node);
2790 c = get_cpu_ptr(s->cpu_slab);
2791
2792 if (unlikely(!page)) {
2793 local_irq_restore(flags);
2794 slab_out_of_memory(s, gfpflags, node);
2795 return NULL;
2796 }
2797
2798 if (c->page)
2799 flush_slab(s, c);
2800
2801 /*
2802 * No other reference to the page yet so we can
2803 * muck around with it freely without cmpxchg
2804 */
2805 freelist = page->freelist;
2806 page->freelist = NULL;
2807
2808 stat(s, ALLOC_SLAB);
2809 c->page = page;
2810
2811 check_new_page:
2812
2813 if (kmem_cache_debug(s)) {
2814 if (!alloc_debug_processing(s, page, freelist, addr))
2815 /* Slab failed checks. Next slab needed */
2816 goto new_slab;
2817 else
2818 /*
2819 * For debug case, we don't load freelist so that all
2820 * allocations go through alloc_debug_processing()
2821 */
2822 goto return_single;
2823 }
2824
2825 if (unlikely(!pfmemalloc_match(page, gfpflags)))
2826 /*
2827 * For !pfmemalloc_match() case we don't load freelist so that
2828 * we don't make further mismatched allocations easier.
2829 */
2830 goto return_single;
2831
2832 goto load_freelist;
2833
2834 return_single:
2835
2836 deactivate_slab(s, page, get_freepointer(s, freelist), c);
2837 local_irq_restore(flags);
2838 return freelist;
2839 }
2840
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[linux-stable-rc:linux-4.4.y 9981/9999] include/asm-generic/bug.h:159:2: error: implicit declaration of function 'no_printk'; did you mean 'printk'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
head: bb07acdd9271518022b632253e857f43c09fb147
commit: b60b53d4980f879884740e672d83155980d74445 [9981/9999] printk: help pr_debug and pr_devel to optimize out arguments
config: powerpc64-buildonly-randconfig-r006-20210822 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 7.5.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/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-4.4.y
git checkout b60b53d4980f879884740e672d83155980d74445
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from lib/842/842_decompress.c:23:0:
lib/842/842_debugfs.h: In function 'sw842_debugfs_create':
lib/842/842_debugfs.h:27:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < ARRAY_SIZE(template_count); i++) {
^
lib/842/842_decompress.c: In function 'next_bits':
lib/842/842_decompress.c:115:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (DIV_ROUND_UP(bits, 8) > p->ilen)
^
In file included from arch/powerpc/include/asm/bug.h:127:0,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from lib/842/842.h:76,
from lib/842/842_decompress.c:22:
lib/842/842_decompress.c: In function '__do_index':
>> include/asm-generic/bug.h:159:2: error: implicit declaration of function 'no_printk'; did you mean 'printk'? [-Werror=implicit-function-declaration]
no_printk(format); \
^
lib/842/842_decompress.c:72:3: note: in expansion of macro 'WARN'
WARN(1, "pr_debug param err invalid size %x\n", s))
^~~~
include/linux/printk.h:114:17: note: in expansion of macro 'beN_to_cpu'
printk(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:289:2: note: in expansion of macro 'no_printk'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
lib/842/842_decompress.c:205:2: note: in expansion of macro 'pr_debug'
pr_debug("index%x to %lx off %lx adjoff %lx tot %lx data %lx\n",
^~~~~~~~
lib/842/842_decompress.c:71:54: warning: signed and unsigned type in conditional expression [-Wsign-compare]
(s) == 8 ? be64_to_cpu(get_unaligned((__be64 *)d)) : \
^
include/linux/printk.h:114:17: note: in expansion of macro 'beN_to_cpu'
printk(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:289:2: note: in expansion of macro 'no_printk'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
lib/842/842_decompress.c:205:2: note: in expansion of macro 'pr_debug'
pr_debug("index%x to %lx off %lx adjoff %lx tot %lx data %lx\n",
^~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/ring_buffer.h:5:0,
from include/linux/trace_events.h:5,
from include/trace/syscall.h:6,
from include/linux/syscalls.h:81,
from arch/powerpc/kernel/syscalls.c:24:
include/linux/mm.h: In function 'is_vmalloc_addr':
include/linux/mm.h:386:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return addr >= VMALLOC_START && addr < VMALLOC_END;
^~
arch/powerpc/kernel/syscalls.c: At top level:
>> arch/powerpc/kernel/syscalls.c:86:1: error: no previous declaration for 'ppc_select' [-Werror=missing-declarations]
ppc_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, struct timeval __user *tvp)
^~~~~~~~~~
>> arch/powerpc/kernel/syscalls.c:118:6: error: no previous declaration for 'ppc_fadvise64_64' [-Werror=missing-declarations]
long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
^~~~~~~~~~~~~~~~
arch/powerpc/kernel/syscalls.c:125:6: error: no previous declaration for 'sys_switch_endian' [-Werror=missing-declarations]
long sys_switch_endian(void)
^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from include/linux/pid_namespace.h:6:0,
from include/linux/ptrace.h:8,
from arch/powerpc/kernel/irq.c:38:
include/linux/mm.h: In function 'is_vmalloc_addr':
include/linux/mm.h:386:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return addr >= VMALLOC_START && addr < VMALLOC_END;
^~
In file included from arch/powerpc/include/asm/bug.h:127:0,
from include/linux/bug.h:4,
from include/linux/cpumask.h:12,
from include/linux/smp.h:12,
from include/linux/kernel_stat.h:4,
from arch/powerpc/kernel/irq.c:35:
include/linux/scatterlist.h: In function 'sg_set_buf':
>> arch/powerpc/include/asm/page.h:129:32: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
^
include/asm-generic/bug.h:146:36: note: in definition of macro 'BUG_ON'
#define BUG_ON(condition) do { if (condition) BUG(); } while (0)
^~~~~~~~~
arch/powerpc/include/asm/page.h:146:32: note: in expansion of macro 'pfn_valid'
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
^~~~~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro 'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
In file included from include/linux/interrupt.h:11:0,
from include/linux/kernel_stat.h:8,
from arch/powerpc/kernel/irq.c:35:
arch/powerpc/kernel/irq.c: In function 'migrate_irqs':
include/linux/irqnr.h:12:45: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
^
arch/powerpc/kernel/irq.c:434:2: note: in expansion of macro 'for_each_irq_desc'
for_each_irq_desc(irq, desc) {
^~~~~~~~~~~~~~~~~
arch/powerpc/kernel/irq.c:445:25: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (cpumask_any(mask) >= nr_cpu_ids) {
^~
arch/powerpc/kernel/irq.c: At top level:
>> arch/powerpc/kernel/irq.c:547:13: error: no previous declaration for 'init_IRQ' [-Werror=missing-declarations]
void __init init_IRQ(void)
^~~~~~~~
cc1: all warnings being treated as errors
--
In file included from arch/powerpc/kernel/signal_32.c:21:0:
include/linux/mm.h: In function 'is_vmalloc_addr':
include/linux/mm.h:386:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return addr >= VMALLOC_START && addr < VMALLOC_END;
^~
In file included from include/asm-generic/termios-base.h:7:0,
from arch/powerpc/include/asm/termios.h:20,
from include/uapi/linux/termios.h:5,
from include/linux/tty.h:6,
from arch/powerpc/kernel/signal_32.c:36:
include/asm-generic/termios-base.h: In function 'user_termio_to_kernel_termios':
arch/powerpc/include/asm/uaccess.h:57:35: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
(((size) == 0) || (((size) - 1) <= ((segment).seg - (addr)))))
^
arch/powerpc/include/asm/uaccess.h:63:3: note: in expansion of macro '__access_ok'
__access_ok((__force unsigned long)(addr), (size), get_fs()))
^~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:300:6: note: in expansion of macro 'access_ok'
if (access_ok(VERIFY_READ, __gu_addr, (size))) { \
^~~~~~~~~
arch/powerpc/include/asm/uaccess.h:103:2: note: in expansion of macro '__get_user_check'
__get_user_check((x), (ptr), sizeof(*(ptr)))
^~~~~~~~~~~~~~~~
include/asm-generic/termios-base.h:35:6: note: in expansion of macro 'get_user'
if (get_user(termios->c_line, &termio->c_line) < 0)
^~~~~~~~
include/asm-generic/termios-base.h: In function 'kernel_termios_to_user_termio':
arch/powerpc/include/asm/uaccess.h:57:35: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
(((size) == 0) || (((size) - 1) <= ((segment).seg - (addr)))))
^
arch/powerpc/include/asm/uaccess.h:63:3: note: in expansion of macro '__access_ok'
__access_ok((__force unsigned long)(addr), (size), get_fs()))
^~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:192:6: note: in expansion of macro 'access_ok'
if (access_ok(VERIFY_WRITE, __pu_addr, size)) \
^~~~~~~~~
arch/powerpc/include/asm/uaccess.h:105:2: note: in expansion of macro '__put_user_check'
__put_user_check((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
^~~~~~~~~~~~~~~~
include/asm-generic/termios-base.h:57:6: note: in expansion of macro 'put_user'
put_user(termios->c_line, &termio->c_line) < 0 ||
^~~~~~~~
arch/powerpc/kernel/signal_32.c: At top level:
arch/powerpc/kernel/signal_32.c:1139:6: error: no previous declaration for 'sys_swapcontext' [-Werror=missing-declarations]
long sys_swapcontext(struct ucontext __user *old_ctx,
^~~~~~~~~~~~~~~
arch/powerpc/kernel/signal_32.c: In function 'sys_swapcontext':
arch/powerpc/kernel/signal_32.c:1184:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (ctx_size < sizeof(struct ucontext))
^
In file included from include/asm-generic/termios-base.h:7:0,
from arch/powerpc/include/asm/termios.h:20,
from include/uapi/linux/termios.h:5,
from include/linux/tty.h:6,
from arch/powerpc/kernel/signal_32.c:36:
arch/powerpc/include/asm/uaccess.h:57:35: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
(((size) == 0) || (((size) - 1) <= ((segment).seg - (addr)))))
^
arch/powerpc/include/asm/uaccess.h:63:3: note: in expansion of macro '__access_ok'
__access_ok((__force unsigned long)(addr), (size), get_fs()))
^~~~~~~~~~~
arch/powerpc/kernel/signal_32.c:1199:8: note: in expansion of macro 'access_ok'
if (!access_ok(VERIFY_WRITE, old_ctx, ctx_size)
^~~~~~~~~
arch/powerpc/include/asm/uaccess.h:57:35: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
(((size) == 0) || (((size) - 1) <= ((segment).seg - (addr)))))
^
arch/powerpc/include/asm/uaccess.h:63:3: note: in expansion of macro '__access_ok'
__access_ok((__force unsigned long)(addr), (size), get_fs()))
^~~~~~~~~~~
arch/powerpc/kernel/signal_32.c:1207:7: note: in expansion of macro 'access_ok'
if (!access_ok(VERIFY_READ, new_ctx, ctx_size)
^~~~~~~~~
>> arch/powerpc/kernel/signal_32.c:1143:16: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable]
unsigned char tmp;
^~~
arch/powerpc/kernel/signal_32.c: At top level:
>> arch/powerpc/kernel/signal_32.c:1230:6: error: no previous declaration for 'sys_rt_sigreturn' [-Werror=missing-declarations]
long sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
^~~~~~~~~~~~~~~~
>> arch/powerpc/kernel/signal_32.c:1311:5: error: no previous declaration for 'sys_debug_setcontext' [-Werror=missing-declarations]
int sys_debug_setcontext(struct ucontext __user *ctx,
^~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/signal_32.c: In function 'sys_debug_setcontext':
arch/powerpc/kernel/signal_32.c:1318:16: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable]
unsigned char tmp;
^~~
arch/powerpc/kernel/signal_32.c: At top level:
>> arch/powerpc/kernel/signal_32.c:1502:6: error: no previous declaration for 'sys_sigreturn' [-Werror=missing-declarations]
long sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
^~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from arch/powerpc/kernel/vdso.c:15:0:
include/linux/mm.h: In function 'is_vmalloc_addr':
include/linux/mm.h:386:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return addr >= VMALLOC_START && addr < VMALLOC_END;
^~
In file included from arch/powerpc/include/asm/bug.h:127:0,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:19,
from arch/powerpc/kernel/vdso.c:13:
include/linux/scatterlist.h: In function 'sg_set_buf':
>> arch/powerpc/include/asm/page.h:129:32: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
^
include/asm-generic/bug.h:146:36: note: in definition of macro 'BUG_ON'
#define BUG_ON(condition) do { if (condition) BUG(); } while (0)
^~~~~~~~~
arch/powerpc/include/asm/page.h:146:32: note: in expansion of macro 'pfn_valid'
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
^~~~~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro 'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
arch/powerpc/kernel/vdso.c: In function 'vdso_fixup_alt_funcs':
arch/powerpc/kernel/vdso.c:609:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (i = 0; i < ARRAY_SIZE(vdso_patches); i++) {
^
arch/powerpc/kernel/vdso.c: In function 'vdso_init':
arch/powerpc/kernel/vdso.c:795:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (i = 0; i < vdso32_pages; i++) {
^
cc1: all warnings being treated as errors
--
In file included from arch/powerpc/kernel/process.c:20:0:
include/linux/mm.h: In function 'is_vmalloc_addr':
include/linux/mm.h:386:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return addr >= VMALLOC_START && addr < VMALLOC_END;
^~
In file included from include/net/inet_frag.h:4:0,
from include/net/netns/ipv4.h:9,
from include/net/net_namespace.h:17,
from include/linux/init_task.h:15,
from arch/powerpc/kernel/process.c:29:
include/linux/rhashtable.h: In function 'rht_grow_above_75':
include/linux/rhashtable.h:264:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return atomic_read(&ht->nelems) > (tbl->size / 4 * 3) &&
^
include/linux/rhashtable.h: In function 'rht_shrink_below_30':
include/linux/rhashtable.h:277:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return atomic_read(&ht->nelems) < (tbl->size * 3 / 10) &&
^
include/linux/rhashtable.h: In function 'rht_grow_above_100':
include/linux/rhashtable.h:289:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return atomic_read(&ht->nelems) > tbl->size &&
^
include/linux/rhashtable.h: In function 'rht_grow_above_max':
include/linux/rhashtable.h:302:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
atomic_read(&ht->nelems) >= ht->p.insecure_max_entries;
^~
In file included from include/net/checksum.h:25:0,
from include/linux/skbuff.h:31,
from include/net/net_namespace.h:32,
from include/linux/init_task.h:15,
from arch/powerpc/kernel/process.c:29:
include/net/checksum.h: In function 'csum_and_copy_from_user':
arch/powerpc/include/asm/uaccess.h:57:35: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
(((size) == 0) || (((size) - 1) <= ((segment).seg - (addr)))))
^
arch/powerpc/include/asm/uaccess.h:63:3: note: in expansion of macro '__access_ok'
__access_ok((__force unsigned long)(addr), (size), get_fs()))
^~~~~~~~~~~
include/net/checksum.h:33:6: note: in expansion of macro 'access_ok'
if (access_ok(VERIFY_READ, src, len))
^~~~~~~~~
include/net/checksum.h: In function 'csum_and_copy_to_user':
arch/powerpc/include/asm/uaccess.h:57:35: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
(((size) == 0) || (((size) - 1) <= ((segment).seg - (addr)))))
^
arch/powerpc/include/asm/uaccess.h:63:3: note: in expansion of macro '__access_ok'
__access_ok((__force unsigned long)(addr), (size), get_fs()))
^~~~~~~~~~~
include/net/checksum.h:49:6: note: in expansion of macro 'access_ok'
if (access_ok(VERIFY_WRITE, dst, len)) {
^~~~~~~~~
In file included from arch/powerpc/include/asm/bug.h:127:0,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:19,
from arch/powerpc/kernel/process.c:18:
include/linux/scatterlist.h: In function 'sg_set_buf':
>> arch/powerpc/include/asm/page.h:129:32: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
^
include/asm-generic/bug.h:146:36: note: in definition of macro 'BUG_ON'
#define BUG_ON(condition) do { if (condition) BUG(); } while (0)
^~~~~~~~~
arch/powerpc/include/asm/page.h:146:32: note: in expansion of macro 'pfn_valid'
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
^~~~~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro 'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
In file included from include/net/net_namespace.h:32:0,
from include/linux/init_task.h:15,
from arch/powerpc/kernel/process.c:29:
include/linux/skbuff.h: In function 'skb_add_data':
include/linux/skbuff.h:2675:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
&csum, from) == copy) {
^~
include/linux/skbuff.h:2679:60: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
} else if (copy_from_iter(skb_put(skb, copy), copy, from) == copy)
^~
include/linux/skbuff.h: In function 'skb_can_coalesce':
include/linux/skbuff.h:2693:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
off == frag->page_offset + skb_frag_size(frag);
^~
include/linux/skbuff.h: In function 'memcpy_from_msg':
include/linux/skbuff.h:2921:51: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return copy_from_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
^~
include/linux/skbuff.h: In function 'memcpy_to_msg':
include/linux/skbuff.h:2926:49: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return copy_to_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
^~
arch/powerpc/kernel/process.c: At top level:
>> arch/powerpc/kernel/process.c:1088:5: error: no previous declaration for 'arch_dup_task_struct' [-Werror=missing-declarations]
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
^~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/process.c:1642:15: error: no previous declaration for 'arch_align_stack' [-Werror=missing-declarations]
unsigned long arch_align_stack(unsigned long sp)
^~~~~~~~~~~~~~~~
arch/powerpc/kernel/process.c:1662:15: error: no previous declaration for 'arch_randomize_brk' [-Werror=missing-declarations]
unsigned long arch_randomize_brk(struct mm_struct *mm)
^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
..
vim +159 include/asm-generic/bug.h
b607e70ec6a982 Josh Triplett 2014-04-07 155
b607e70ec6a982 Josh Triplett 2014-04-07 156 #ifndef WARN
b607e70ec6a982 Josh Triplett 2014-04-07 157 #define WARN(condition, format...) ({ \
b607e70ec6a982 Josh Triplett 2014-04-07 158 int __ret_warn_on = !!(condition); \
4e50ebde32bed6 Josh Triplett 2014-04-07 @159 no_printk(format); \
b607e70ec6a982 Josh Triplett 2014-04-07 160 unlikely(__ret_warn_on); \
b607e70ec6a982 Josh Triplett 2014-04-07 161 })
b607e70ec6a982 Josh Triplett 2014-04-07 162 #endif
b607e70ec6a982 Josh Triplett 2014-04-07 163
:::::: The code at line 159 was first introduced by commit
:::::: 4e50ebde32bed67a9aec8c239bbd89e5d0b8727b bug: when !CONFIG_BUG, make WARN call no_printk to check format and args
:::::: TO: Josh Triplett <josh(a)joshtriplett.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1807:1: warning: unused variable 'iwl_dbgfs_dbg_time_point_ops'
by kernel test robot
Hi Mordechay,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9ff50bf2f2ff5fab01cac26d8eed21a89308e6ef
commit: 9dbb62a29042e543ab6671dc12c1473c3cbc58c2 iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point
date: 7 months ago
config: i386-randconfig-a015-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
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 9dbb62a29042e543ab6671dc12c1473c3cbc58c2
# 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 >>):
>> drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1807:1: warning: unused variable 'iwl_dbgfs_dbg_time_point_ops' [-Wunused-const-variable]
MVM_DEBUGFS_WRITE_FILE_OPS(dbg_time_point, 64);
^
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1554:2: note: expanded from macro 'MVM_DEBUGFS_WRITE_FILE_OPS'
_MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz, struct iwl_mvm)
^
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.h:39:37: note: expanded from macro '_MVM_DEBUGFS_WRITE_FILE_OPS'
static const struct file_operations iwl_dbgfs_##name##_ops = { \
^
<scratch space>:52:1: note: expanded from here
iwl_dbgfs_dbg_time_point_ops
^
1 warning generated.
vim +/iwl_dbgfs_dbg_time_point_ops +1807 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
1780
1781 /* Device wide debugfs entries */
1782 MVM_DEBUGFS_READ_FILE_OPS(ctdp_budget);
1783 MVM_DEBUGFS_WRITE_FILE_OPS(stop_ctdp, 8);
1784 MVM_DEBUGFS_WRITE_FILE_OPS(force_ctkill, 8);
1785 MVM_DEBUGFS_WRITE_FILE_OPS(tx_flush, 16);
1786 MVM_DEBUGFS_WRITE_FILE_OPS(sta_drain, 8);
1787 MVM_DEBUGFS_WRITE_FILE_OPS(send_echo_cmd, 8);
1788 MVM_DEBUGFS_READ_WRITE_FILE_OPS(sram, 64);
1789 MVM_DEBUGFS_READ_WRITE_FILE_OPS(set_nic_temperature, 64);
1790 MVM_DEBUGFS_READ_FILE_OPS(nic_temp);
1791 MVM_DEBUGFS_READ_FILE_OPS(stations);
1792 MVM_DEBUGFS_READ_FILE_OPS(rs_data);
1793 MVM_DEBUGFS_READ_FILE_OPS(bt_notif);
1794 MVM_DEBUGFS_READ_FILE_OPS(bt_cmd);
1795 MVM_DEBUGFS_READ_WRITE_FILE_OPS(disable_power_off, 64);
1796 MVM_DEBUGFS_READ_FILE_OPS(fw_rx_stats);
1797 MVM_DEBUGFS_READ_FILE_OPS(drv_rx_stats);
1798 MVM_DEBUGFS_READ_FILE_OPS(fw_ver);
1799 MVM_DEBUGFS_READ_FILE_OPS(phy_integration_ver);
1800 MVM_DEBUGFS_WRITE_FILE_OPS(fw_restart, 10);
1801 MVM_DEBUGFS_WRITE_FILE_OPS(fw_nmi, 10);
1802 MVM_DEBUGFS_WRITE_FILE_OPS(bt_tx_prio, 10);
1803 MVM_DEBUGFS_WRITE_FILE_OPS(bt_force_ant, 10);
1804 MVM_DEBUGFS_READ_WRITE_FILE_OPS(scan_ant_rxchain, 8);
1805 MVM_DEBUGFS_READ_WRITE_FILE_OPS(fw_dbg_conf, 8);
1806 MVM_DEBUGFS_WRITE_FILE_OPS(fw_dbg_collect, 64);
> 1807 MVM_DEBUGFS_WRITE_FILE_OPS(dbg_time_point, 64);
1808 MVM_DEBUGFS_WRITE_FILE_OPS(indirection_tbl,
1809 (IWL_RSS_INDIRECTION_TABLE_SIZE * 2));
1810 MVM_DEBUGFS_WRITE_FILE_OPS(inject_packet, 512);
1811 MVM_DEBUGFS_WRITE_FILE_OPS(inject_beacon_ie, 512);
1812 MVM_DEBUGFS_WRITE_FILE_OPS(inject_beacon_ie_restore, 512);
1813
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[intel-linux-intel-lts:5.10/preempt-rt 10959/15484] drivers/media/v4l2-core/v4l2-subdev.c:908:5: warning: stack frame size (1400) exceeds limit (1024) in function 'v4l2_subdev_link_validate'
by kernel test robot
Hi Wanhui,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 930cf1182ee9f0e8af50e85a461c4492343c7b55
commit: f13978177f8c57c155d53df5f2df60f519e82e4a [10959/15484] v4l: subdev: Add support for sub-streams
config: hexagon-randconfig-r023-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a83d99c55ebb14532c414066a5aa3bdb65389965)
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/intel/linux-intel-lts/commit/f13978177f8c57c155d53df5f...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.10/preempt-rt
git checkout f13978177f8c57c155d53df5f2df60f519e82e4a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/v4l2-core/v4l2-subdev.c:908:5: warning: stack frame size (1400) exceeds limit (1024) in function 'v4l2_subdev_link_validate' [-Wframe-larger-than]
int v4l2_subdev_link_validate(struct media_link *link)
^
1 warning generated.
vim +/v4l2_subdev_link_validate +908 drivers/media/v4l2-core/v4l2-subdev.c
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 907
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 @908 int v4l2_subdev_link_validate(struct media_link *link)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 909 {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 910 struct v4l2_subdev *sink;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 911 struct v4l2_subdev_route sink_routes[LINK_VALIDATE_ROUTES];
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 912 struct v4l2_subdev_routing sink_routing = {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 913 .routes = sink_routes,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 914 .num_routes = ARRAY_SIZE(sink_routes),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 915 };
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 916 struct v4l2_subdev_route src_routes[LINK_VALIDATE_ROUTES];
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 917 struct v4l2_subdev_routing src_routing = {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 918 .routes = src_routes,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 919 .num_routes = ARRAY_SIZE(src_routes),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 920 };
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 921 unsigned int i, j;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 922 int rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 923
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 924 sink = media_entity_to_v4l2_subdev(link->sink->entity);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 925 if (!sink)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 926 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 927
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 928 if (!(link->sink->flags & MEDIA_PAD_FL_MULTIPLEX &&
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 929 link->source->flags & MEDIA_PAD_FL_MULTIPLEX))
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 930 return v4l2_subdev_link_validate_one(link, link->source, 0,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 931 link->sink, 0);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 932 /*
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 933 * multiplex link cannot proceed without route information.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 934 */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 935 rval = v4l2_subdev_call(sink, pad, get_routing, &sink_routing);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 936 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 937 dev_err(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 938 "error %d in get_routing() on %s, sink pad %u\n", rval,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 939 sink->entity.name, link->sink->index);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 940
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 941 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 942 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 943
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 944 rval = v4l2_subdev_call(media_entity_to_v4l2_subdev(
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 945 link->source->entity),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 946 pad, get_routing, &src_routing);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 947 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 948 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 949 "error %d in get_routing() on %s, source pad %u\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 950 rval, sink->entity.name, link->source->index);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 951
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 952 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 953 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 954
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 955 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 956 "validating multiplexed link \"%s\":%u -> \"%s\":%u; %u/%u routes\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 957 link->source->entity->name, link->source->index,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 958 sink->entity.name, link->sink->index,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 959 src_routing.num_routes, sink_routing.num_routes);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 960
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 961 for (i = 0; i < sink_routing.num_routes; i++) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 962 /* Get the first active route for the sink pad. */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 963 if (sink_routes[i].sink_pad != link->sink->index ||
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 964 !(sink_routes[i].flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 965 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 966 "skipping sink route %u/%u -> %u/%u[%u]\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 967 sink_routes[i].sink_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 968 sink_routes[i].sink_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 969 sink_routes[i].source_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 970 sink_routes[i].source_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 971 (bool)(sink_routes[i].flags
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 972 & V4L2_SUBDEV_ROUTE_FL_ACTIVE));
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 973 continue;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 974 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 975
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 976 /*
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 977 * Get the corresponding route for the source pad.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 978 * It's ok for the source pad to have routes active
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 979 * where the sink pad does not, but the routes that
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 980 * are active on the source pad have to be active on
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 981 * the sink pad as well.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 982 */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 983
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 984 for (j = 0; j < src_routing.num_routes; j++) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 985 if (src_routes[j].source_pad == link->source->index &&
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 986 src_routes[j].source_stream
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 987 == sink_routes[i].sink_stream)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 988 break;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 989 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 990
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 991 if (j == src_routing.num_routes) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 992 dev_err(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 993 "no corresponding source found.\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 994 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 995 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 996
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 997 /* The source route must be active. */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 998 if (!(src_routes[j].flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 999 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1000 "source route not active\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1001 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1002 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1003
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1004 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1005 "validating link \"%s\": %u/%u => \"%s\" %u/%u\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1006 link->source->entity->name, src_routes[j].source_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1007 src_routes[j].source_stream, sink->entity.name,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1008 sink_routes[i].sink_pad, sink_routes[i].sink_stream);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1009
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1010 rval = v4l2_subdev_link_validate_one(
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1011 link, link->source, src_routes[j].source_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1012 link->sink, sink_routes[i].sink_stream);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1013 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1014 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1015 "error %d in link validation\n", rval);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1016 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1017 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1018 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1019
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1020 if (i < sink_routing.num_routes) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1021 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1022 "not all sink routes verified; out of source routes\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1023 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1024 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1025
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1026 return 0;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1027 }
8227c92b696884 drivers/media/video/v4l2-subdev.c Sakari Ailus 2011-10-10 1028 EXPORT_SYMBOL_GPL(v4l2_subdev_link_validate);
9b02cbb3ede89b drivers/media/v4l2-core/v4l2-subdev.c Laurent Pinchart 2015-04-24 1029
:::::: The code at line 908 was first introduced by commit
:::::: e822d33e27dd00bb200f0e9db1811231554ce03c v4l: Take routing info into account in link validation
:::::: TO: wu xia <xia.wu(a)intel.com>
:::::: CC: Pan, Kris <kris.pan(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[frank-w-bpi-r2-4.14:5.14-otg 7/29] cc1: error: drivers/misc/mediatek/connectivity/common/common_detect/../combo/linux/include: No such file or directory
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.14-otg
head: e365457a96cfe4f1f784f8ac48cfe2d0e92ac100
commit: 37712f1859df4407162f77ee1543b1c17dccaae0 [7/29] mt6625l: include wifi-code
config: arm-randconfig-r021-20210822 (attached as .config)
compiler: arm-linux-gnueabi-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/frank-w/BPI-R2-4.14/commit/37712f1859df4407162f77ee154...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.14-otg
git checkout 37712f1859df4407162f77ee1543b1c17dccaae0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
cc1: error: arch/arm/mach-mt7623//dct/dct: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: drivers/misc/mediatek/connectivity/common/common_detect/../combo/linux/include: No such file or directory [-Werror=missing-include-dirs]
In file included from drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect.c:24:
drivers/misc/mediatek/connectivity/common/common_detect/wmt_gpio.h:24:10: fatal error: osal.h: No such file or directory
24 | #include "osal.h"
| ^~~~~~~~
cc1: all warnings being treated as errors
compilation terminated.
--
cc1: error: arch/arm/mach-mt7623//dct/dct: No such file or directory [-Werror=missing-include-dirs]
>> cc1: error: drivers/misc/mediatek/connectivity/common/common_detect/../combo/linux/include: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MTK_GPS
Depends on ARM && GPS
Selected by
- MTK_GPS_SUPPORT && ARM
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[intel-linux-intel-lts:5.10/yocto 13/14] drivers/media/i2c/imx390.c:724:21: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 3ebd33d042d488ba5ca3a11f7520a6084793ba13
commit: 1a1b0ad359afd4d118fc6a546f7b52eed25b9211 [13/14] media: imx390: add dummpy v4l2 CID
config: alpha-randconfig-s031-20210813 (attached as .config)
compiler: alpha-linux-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://github.com/intel/linux-intel-lts/commit/1a1b0ad359afd4d118fc6a546...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.10/yocto
git checkout 1a1b0ad359afd4d118fc6a546f7b52eed25b9211
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/media/i2c/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/media/i2c/imx390.c:493:9: sparse: sparse: mixing declarations and code
>> drivers/media/i2c/imx390.c:724:21: sparse: sparse: Using plain integer as NULL pointer
drivers/media/i2c/imx390.c:1144:13: sparse: sparse: symbol 'imx390_threaded_irq_fn' was not declared. Should it be static?
vim +724 drivers/media/i2c/imx390.c
640
641 static int imx390_init_controls(struct imx390 *imx390)
642 {
643 struct v4l2_ctrl_handler *ctrl_hdlr;
644 s64 hblank;
645 int ret;
646 struct v4l2_ctrl_config cfg = { 0 };
647
648 ctrl_hdlr = &imx390->ctrl_handler;
649 ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
650 if (ret)
651 return ret;
652
653 ctrl_hdlr->lock = &imx390->mutex;
654 imx390->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, &imx390_ctrl_ops,
655 V4L2_CID_LINK_FREQ,
656 ARRAY_SIZE(link_freq_menu_items) - 1,
657 0, link_freq_menu_items);
658 if (imx390->link_freq)
659 imx390->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
660
661 imx390->vblank = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops,
662 V4L2_CID_VBLANK,
663 0,
664 IMX390_VTS_MAX - imx390->cur_mode->height, 1,
665 imx390->cur_mode->vts_def - imx390->cur_mode->height);
666
667 imx390->gain = v4l2_ctrl_new_std(
668 ctrl_hdlr,
669 &imx390_ctrl_ops,
670 V4L2_CID_GAIN, IMX390_GAIN_MIN,
671 IMX390_DGTL_GAIN_MAX * IMX390_ANAL_GAIN_MAX, 1,
672 IMX390_GAIN_DEFAULT);
673
674 imx390->analogue_gain = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
675 IMX390_ANAL_GAIN_MIN, IMX390_ANAL_GAIN_MAX,
676 IMX390_ANAL_GAIN_STEP, IMX390_ANAL_GAIN_DEFAULT);
677
678 imx390->digital_gain = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops, V4L2_CID_DIGITAL_GAIN,
679 IMX390_DGTL_GAIN_MIN, IMX390_DGTL_GAIN_MAX,
680 IMX390_DGTL_GAIN_STEP, IMX390_DGTL_GAIN_DEFAULT);
681
682 imx390->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops,
683 V4L2_CID_EXPOSURE,
684 IMX390_EXPOSURE_MIN,
685 IMX390_EXPOSURE_MAX,
686 IMX390_EXPOSURE_STEP,
687 IMX390_EXPOSURE_DEF);
688
689 imx390->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops,
690 V4L2_CID_PIXEL_RATE, get_pixel_rate(imx390), get_pixel_rate(imx390),
691 1, get_pixel_rate(imx390));
692
693 if (imx390->pixel_rate)
694 imx390->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
695
696 hblank = get_hblank(imx390);
697 imx390->hblank = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops, V4L2_CID_HBLANK,
698 hblank, hblank, 1, hblank);
699 if (imx390->hblank)
700 imx390->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
701
702 imx390->red_balance = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops,
703 V4L2_CID_RED_BALANCE,
704 IMX390_RED_BALANCE_MIN,
705 IMX390_RED_BALANCE_MAX,
706 IMX390_RED_BALANCE_STEP,
707 IMX390_RED_BALANCE_DEF);
708
709 imx390->blue_balance = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops,
710 V4L2_CID_BLUE_BALANCE,
711 IMX390_BLUE_BALANCE_MIN,
712 IMX390_BLUE_BALANCE_MAX,
713 IMX390_BLUE_BALANCE_STEP,
714 IMX390_BLUE_BALANCE_DEF);
715
716 cfg.ops = &imx390_ctrl_ops;
717 cfg.id = IMX390_CID_EXPOSURE_SHS1;
718 cfg.name = "IMX390_CID_EXPOSURE_SHS1";
719 cfg.type = V4L2_CTRL_TYPE_INTEGER;
720 cfg.max = IMX390_DUMMY_MAX;
721 cfg.min = IMX390_DUMMY_MIN;
722 cfg.step = IMX390_DUMMY_STEP;
723 cfg.def = IMX390_DUMMY_DEF;
> 724 cfg.qmenu = 0; cfg.elem_size = 0;
725 imx390->dummy_exp_shs1 = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
726
727 cfg.id = IMX390_CID_EXPOSURE_SHS2;
728 cfg.name = "IMX390_CID_EXPOSURE_SHS2";
729 imx390->dummy_exp_shs2 = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
730
731 cfg.id = IMX390_CID_EXPOSURE_SHS3;
732 cfg.name = "IMX390_CID_EXPOSURE_SHS3";
733 imx390->dummy_exp_shs3 = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
734
735 cfg.id = IMX390_CID_EXPOSURE_RHS1;
736 cfg.name = "IMX390_CID_EXPOSURE_RHS1";
737 imx390->dummy_exp_rhs1 = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
738
739 cfg.id = IMX390_CID_EXPOSURE_RHS2;
740 cfg.name = "IMX390_CID_EXPOSURE_RHS2";
741 imx390->dummy_exp_rhs2 = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
742
743 cfg.id = IMX390_CID_DIGITAL_GAIN_L;
744 cfg.name = "IMX390_CID_DIGITAL_GAIN_L";
745 imx390->dummy_dg_l = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
746
747 cfg.id = IMX390_CID_DIGITAL_GAIN_S;
748 cfg.name = "IMX390_CID_DIGITAL_GAIN_S";
749 imx390->dummy_dg_s = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
750
751 cfg.id = IMX390_CID_DIGITAL_GAIN_VS;
752 cfg.name = "IMX390_CID_DIGITAL_GAIN_VS";
753 imx390->dummy_dg_vs = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
754
755 cfg.id = IMX390_CID_ANALOG_GAIN_L;
756 cfg.name = "IMX390_CID_ANALOG_GAIN_L";
757 imx390->dummy_ag_l = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
758
759 cfg.id = IMX390_CID_ANALOG_GAIN_S;
760 cfg.name = "IMX390_CID_ANALOG_GAIN_S";
761 imx390->dummy_ag_s = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
762
763 cfg.id = IMX390_CID_ANALOG_GAIN_VS;
764 cfg.name = "IMX390_CID_ANALOG_GAIN_VS";
765 imx390->dummy_ag_vs = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
766
767 if (ctrl_hdlr->error)
768 return ctrl_hdlr->error;
769
770 imx390->sd.ctrl_handler = ctrl_hdlr;
771
772 return 0;
773 }
774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[intel-linux-intel-lts:5.10/yocto 10656/15115] drivers/media/i2c/lt6911uxc.c:787:21: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: a70bb6a927c84079200a53c29462319293d3df1d
commit: 367a342a05c249be8a0ea5e9d1e9dd5669a02abf [10656/15115] media: lt6911uxc:add sensor driver
config: alpha-randconfig-s031-20210813 (attached as .config)
compiler: alpha-linux-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://github.com/intel/linux-intel-lts/commit/367a342a05c249be8a0ea5e9d...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.10/yocto
git checkout 367a342a05c249be8a0ea5e9d1e9dd5669a02abf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/media/i2c/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/media/i2c/lt6911uxc.c:787:21: sparse: sparse: Using plain integer as NULL pointer
drivers/media/i2c/lt6911uxc.c:1134:10: sparse: sparse: Initializer entry defined twice
drivers/media/i2c/lt6911uxc.c:1140:10: sparse: also defined here
vim +787 drivers/media/i2c/lt6911uxc.c
717
718 static int lt6911uxc_init_controls(struct lt6911uxc_state *lt6911uxc)
719 {
720 struct i2c_client *client = v4l2_get_subdevdata(<6911uxc->sd);
721 struct v4l2_ctrl_handler *ctrl_hdlr;
722 s64 hblank;
723 struct v4l2_ctrl_config cfg = { 0 };
724 int ret;
725
726 ctrl_hdlr = <6911uxc->ctrl_handler;
727 ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
728 if (ret)
729 return ret;
730
731 ctrl_hdlr->lock = <6911uxc->mutex;
732 lt6911uxc->link_freq =
733 v4l2_ctrl_new_int_menu(ctrl_hdlr,
734 <6911uxc_ctrl_ops,
735 V4L2_CID_LINK_FREQ,
736 sizeof(lt6911uxc->cur_mode->pixel_clk),
737 0, (s64 *)<6911uxc->cur_mode->pixel_clk);
738 if (ctrl_hdlr->error) {
739 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
740 ctrl_hdlr->error);
741 return ctrl_hdlr->error;
742 }
743 if (lt6911uxc->link_freq)
744 lt6911uxc->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
745
746 lt6911uxc->vblank = v4l2_ctrl_new_std(ctrl_hdlr,
747 <6911uxc_ctrl_ops,
748 V4L2_CID_VBLANK, 0, 1, 1, 1);
749 if (ctrl_hdlr->error) {
750 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
751 ctrl_hdlr->error);
752 return ctrl_hdlr->error;
753 }
754
755 lt6911uxc->analogue_gain = v4l2_ctrl_new_std(ctrl_hdlr,
756 <6911uxc_ctrl_ops,
757 V4L2_CID_ANALOGUE_GAIN, 0, 1, 1, 1);
758 if (ctrl_hdlr->error) {
759 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
760 ctrl_hdlr->error);
761 return ctrl_hdlr->error;
762 }
763
764 lt6911uxc->digital_gain = v4l2_ctrl_new_std(ctrl_hdlr,
765 <6911uxc_ctrl_ops,
766 V4L2_CID_DIGITAL_GAIN, 0, 1, 1, 1);
767 if (ctrl_hdlr->error) {
768 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
769 ctrl_hdlr->error);
770 return ctrl_hdlr->error;
771 }
772
773 lt6911uxc->exposure = v4l2_ctrl_new_std(ctrl_hdlr,
774 <6911uxc_ctrl_ops,
775 V4L2_CID_EXPOSURE, 0, 1, 1, 1);
776 if (ctrl_hdlr->error) {
777 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
778 ctrl_hdlr->error);
779 return ctrl_hdlr->error;
780 }
781
782 cfg.ops = <6911uxc_ctrl_ops;
783 cfg.id = V4L2_CID_MIPI_LANES;
784 cfg.name = "V4L2_CID_MIPI_LANES";
785 cfg.type = V4L2_CTRL_TYPE_INTEGER;
786 cfg.max = 4; cfg.min = 2; cfg.step = 2; cfg.def = 4;
> 787 cfg.qmenu = 0; cfg.elem_size = 0;
788 lt6911uxc->mipi_lanes = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
789 if (ctrl_hdlr->error) {
790 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
791 ctrl_hdlr->error);
792 return ctrl_hdlr->error;
793 }
794
795 lt6911uxc_csi_port.def = lt6911uxc->platform_data->port;
796 lt6911uxc->csi_port =
797 v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_csi_port, NULL);
798 if (ctrl_hdlr->error) {
799 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
800 ctrl_hdlr->error);
801 return ctrl_hdlr->error;
802 }
803
804 lt6911uxc_i2c_bus.def = i2c_adapter_id(client->adapter);
805 lt6911uxc->i2c_bus =
806 v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_i2c_bus, NULL);
807 if (ctrl_hdlr->error) {
808 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
809 ctrl_hdlr->error);
810 return ctrl_hdlr->error;
811 }
812
813 lt6911uxc_i2c_id.def = client->addr;
814 lt6911uxc->i2c_id = v4l2_ctrl_new_custom(ctrl_hdlr,
815 <6911uxc_i2c_id, NULL);
816 if (ctrl_hdlr->error) {
817 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
818 ctrl_hdlr->error);
819 return ctrl_hdlr->error;
820 }
821
822 lt6911uxc_i2c_slave_address.def =
823 lt6911uxc->platform_data->i2c_slave_address;
824 lt6911uxc->i2c_slave_address = v4l2_ctrl_new_custom(ctrl_hdlr,
825 <6911uxc_i2c_slave_address, NULL);
826 if (ctrl_hdlr->error) {
827 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
828 ctrl_hdlr->error);
829 return ctrl_hdlr->error;
830 }
831
832 lt6911uxc_fps.def = lt6911uxc->cur_mode->fps;
833 lt6911uxc->fps = v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_fps, NULL);
834 if (ctrl_hdlr->error) {
835 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
836 ctrl_hdlr->error);
837 return ctrl_hdlr->error;
838 }
839
840 lt6911uxc_frame_interval.def = 1000 / lt6911uxc->cur_mode->fps;
841 lt6911uxc->frame_interval = v4l2_ctrl_new_custom(ctrl_hdlr,
842 <6911uxc_frame_interval, NULL);
843 if (ctrl_hdlr->error) {
844 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
845 ctrl_hdlr->error);
846 return ctrl_hdlr->error;
847 }
848
849 lt6911uxc->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr,
850 <6911uxc_ctrl_ops,
851 V4L2_CID_PIXEL_RATE,
852 get_pixel_rate(lt6911uxc),
853 get_pixel_rate(lt6911uxc), 1,
854 get_pixel_rate(lt6911uxc));
855 if (ctrl_hdlr->error) {
856 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
857 ctrl_hdlr->error);
858 return ctrl_hdlr->error;
859 }
860 if (lt6911uxc->pixel_rate)
861 lt6911uxc->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
862
863 hblank = 1;
864 lt6911uxc->hblank = v4l2_ctrl_new_std(ctrl_hdlr,
865 <6911uxc_ctrl_ops,
866 V4L2_CID_HBLANK, 0, 1, 1, 1);
867 if (ctrl_hdlr->error) {
868 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
869 ctrl_hdlr->error);
870 return ctrl_hdlr->error;
871 }
872 if (lt6911uxc->hblank)
873 lt6911uxc->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
874
875 /* custom v4l2 audio controls */
876 lt6911uxc->audio_sampling_rate_ctrl = v4l2_ctrl_new_custom(
877 ctrl_hdlr, <6911uxc_ctrl_audio_sampling_rate, NULL);
878 if (ctrl_hdlr->error) {
879 dev_dbg(&client->dev, "Set audio sampling rate ctrl, err=%d.\n",
880 ctrl_hdlr->error);
881 return ctrl_hdlr->error;
882 }
883 lt6911uxc->audio_present_ctrl = v4l2_ctrl_new_custom(ctrl_hdlr,
884 <6911uxc_ctrl_audio_present, NULL);
885 if (ctrl_hdlr->error) {
886 dev_dbg(&client->dev, "Set audio present ctrl, error = %d.\n",
887 ctrl_hdlr->error);
888 return ctrl_hdlr->error;
889 }
890
891 lt6911uxc->sd.ctrl_handler = ctrl_hdlr;
892 return 0;
893 }
894
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[frank-w-bpi-r2-4.14:5.14-otg 8/29] drivers/soc/mediatek/mtk-pmic-wrap.c:2112:16: warning: no previous prototype for 'pwrap_node_to_regmap'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.14-otg
head: e365457a96cfe4f1f784f8ac48cfe2d0e92ac100
commit: daf840cab15926e075953cf836e903114868c074 [8/29] mt6625l: add changes outside driver dir
config: m68k-buildonly-randconfig-r001-20210822 (attached as .config)
compiler: m68k-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/frank-w/BPI-R2-4.14/commit/daf840cab15926e075953cf836e...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.14-otg
git checkout daf840cab15926e075953cf836e903114868c074
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
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/soc/mediatek/mtk-pmic-wrap.c:2112:16: warning: no previous prototype for 'pwrap_node_to_regmap' [-Wmissing-prototypes]
2112 | struct regmap *pwrap_node_to_regmap(struct device_node *np)
| ^~~~~~~~~~~~~~~~~~~~
drivers/soc/mediatek/mtk-pmic-wrap.c:2072:34: warning: 'of_pwrap_match_tbl' defined but not used [-Wunused-const-variable=]
2072 | static const struct of_device_id of_pwrap_match_tbl[] = {
| ^~~~~~~~~~~~~~~~~~
drivers/soc/mediatek/mtk-pmic-wrap.c:1900:34: warning: 'of_slave_match_tbl' defined but not used [-Wunused-const-variable=]
1900 | static const struct of_device_id of_slave_match_tbl[] = {
| ^~~~~~~~~~~~~~~~~~
vim +/pwrap_node_to_regmap +2112 drivers/soc/mediatek/mtk-pmic-wrap.c
2111
> 2112 struct regmap *pwrap_node_to_regmap(struct device_node *np)
2113 {
2114 struct platform_device *pdev;
2115 struct pmic_wrapper *wrp;
2116 pdev = of_find_device_by_node(np);
2117 if (!pdev)
2118 return ERR_PTR(-ENODEV);
2119 wrp = platform_get_drvdata(pdev);
2120 return wrp->regmap;
2121 }
2122 EXPORT_SYMBOL_GPL(pwrap_node_to_regmap);
2123
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year