Re: [RFC PATCH 1/7] sched/vtime: Move guest enter/exit vtime accounting to separate helpers
by kernel test robot
Hi Sean,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on kvm/queue]
[also build test ERROR on vhost/linux-next linus/master v5.12-rc7 next-20210413]
[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/Sean-Christopherson/KVM-Fix-tick...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c68e2a1489e453b217384eb985d04dd67...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Christopherson/KVM-Fix-tick-based-vtime-accounting-on-x86/20210414-023106
git checkout c68e2a1489e453b217384eb985d04dd6784c3b53
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 error/warnings (new ones prefixed by >>):
In file included from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/linux/kernel_stat.h:9,
from include/linux/cgroup.h:26,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/powerpc/kernel/asm-offsets.c:23:
include/linux/vtime.h: In function 'vtime_account_guest_enter':
>> include/linux/vtime.h:25:2: error: implicit declaration of function 'vtime_account_kernel'; did you mean 'vtime_account_guest_enter'? [-Werror=implicit-function-declaration]
25 | vtime_account_kernel(current);
| ^~~~~~~~~~~~~~~~~~~~
| vtime_account_guest_enter
include/linux/vtime.h: At top level:
>> include/linux/vtime.h:103:13: warning: conflicting types for 'vtime_account_kernel'
103 | extern void vtime_account_kernel(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/vtime.h:25:2: note: previous implicit declaration of 'vtime_account_kernel' was here
25 | vtime_account_kernel(current);
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/linux/kernel_stat.h:9,
from include/linux/cgroup.h:26,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/powerpc/kernel/asm-offsets.c:23:
include/linux/vtime.h: In function 'vtime_account_guest_enter':
>> include/linux/vtime.h:25:2: error: implicit declaration of function 'vtime_account_kernel'; did you mean 'vtime_account_guest_enter'? [-Werror=implicit-function-declaration]
25 | vtime_account_kernel(current);
| ^~~~~~~~~~~~~~~~~~~~
| vtime_account_guest_enter
include/linux/vtime.h: At top level:
>> include/linux/vtime.h:103:13: warning: conflicting types for 'vtime_account_kernel'
103 | extern void vtime_account_kernel(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/vtime.h:25:2: note: previous implicit declaration of 'vtime_account_kernel' was here
25 | vtime_account_kernel(current);
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:116: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from include/linux/kernel_stat.h:9,
from include/linux/cgroup.h:26,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/powerpc/kernel/asm-offsets.c:23:
include/linux/vtime.h: In function 'vtime_account_guest_enter':
>> include/linux/vtime.h:25:2: error: implicit declaration of function 'vtime_account_kernel'; did you mean 'vtime_account_guest_enter'? [-Werror=implicit-function-declaration]
25 | vtime_account_kernel(current);
| ^~~~~~~~~~~~~~~~~~~~
| vtime_account_guest_enter
include/linux/vtime.h: At top level:
>> include/linux/vtime.h:103:13: warning: conflicting types for 'vtime_account_kernel'
103 | extern void vtime_account_kernel(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/vtime.h:25:2: note: previous implicit declaration of 'vtime_account_kernel' was here
25 | vtime_account_kernel(current);
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:116: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +25 include/linux/vtime.h
22
23 static __always_inline void vtime_account_guest_enter(void)
24 {
> 25 vtime_account_kernel(current);
26 current->flags |= PF_VCPU;
27 }
28
29 static __always_inline void vtime_account_guest_exit(void)
30 {
31
32 }
33
34 #elif defined(CONFIG_VIRT_CPU_ACCOUNTING_GEN)
35
36 /*
37 * Checks if vtime is enabled on some CPU. Cputime readers want to be careful
38 * in that case and compute the tickless cputime.
39 * For now vtime state is tied to context tracking. We might want to decouple
40 * those later if necessary.
41 */
42 static inline bool vtime_accounting_enabled(void)
43 {
44 return context_tracking_enabled();
45 }
46
47 static inline bool vtime_accounting_enabled_cpu(int cpu)
48 {
49 return context_tracking_enabled_cpu(cpu);
50 }
51
52 static inline bool vtime_accounting_enabled_this_cpu(void)
53 {
54 return context_tracking_enabled_this_cpu();
55 }
56
57 extern void vtime_task_switch_generic(struct task_struct *prev);
58
59 static inline void vtime_task_switch(struct task_struct *prev)
60 {
61 if (vtime_accounting_enabled_this_cpu())
62 vtime_task_switch_generic(prev);
63 }
64
65 static __always_inline void vtime_account_guest_enter(void)
66 {
67 if (vtime_accounting_enabled_this_cpu())
68 vtime_guest_enter(current);
69 else
70 current->flags |= PF_VCPU;
71 }
72
73 static __always_inline void vtime_account_guest_exit(void)
74 {
75 if (vtime_accounting_enabled_this_cpu())
76 vtime_guest_exit(current);
77 else
78 current->flags &= ~PF_VCPU;
79 }
80
81
82 #else /* !CONFIG_VIRT_CPU_ACCOUNTING */
83
84 static inline bool vtime_accounting_enabled_this_cpu(void) { return false; }
85 static inline void vtime_task_switch(struct task_struct *prev) { }
86
87 static __always_inline void vtime_account_guest_enter(void)
88 {
89 current->flags |= PF_VCPU;
90 }
91
92 static __always_inline void vtime_account_guest_exit(void)
93 {
94 current->flags &= ~PF_VCPU;
95 }
96
97 #endif
98
99 /*
100 * Common vtime APIs
101 */
102 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
> 103 extern void vtime_account_kernel(struct task_struct *tsk);
104 extern void vtime_account_idle(struct task_struct *tsk);
105 #endif /* CONFIG_VIRT_CPU_ACCOUNTING */
106
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
net/ceph/messenger_v2.c:2808:5: warning: stack frame size of 1920 bytes in function 'ceph_con_v2_try_read'
by kernel test robot
Hi Ilya,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: cd1a677cad994021b19665ed476aea63f5d54f31 libceph, ceph: implement msgr2.1 protocol (crc and secure modes)
date: 4 months ago
config: powerpc64-randconfig-r014-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# 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 cd1a677cad994021b19665ed476aea63f5d54f31
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from net/ceph/messenger_v2.c:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:46:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v2.c:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:48:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v2.c:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:50:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v2.c:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:52:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v2.c:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:54:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v2.c:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:56:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/ceph/messenger_v2.c:2808:5: warning: stack frame size of 1920 bytes in function 'ceph_con_v2_try_read' [-Wframe-larger-than=]
int ceph_con_v2_try_read(struct ceph_connection *con)
^
7 warnings generated.
vim +/ceph_con_v2_try_read +2808 net/ceph/messenger_v2.c
2807
> 2808 int ceph_con_v2_try_read(struct ceph_connection *con)
2809 {
2810 int ret;
2811
2812 dout("%s con %p state %d need %zu\n", __func__, con, con->state,
2813 iov_iter_count(&con->v2.in_iter));
2814
2815 if (con->state == CEPH_CON_S_PREOPEN)
2816 return 0;
2817
2818 /*
2819 * We should always have something pending here. If not,
2820 * avoid calling populate_in_iter() as if we read something
2821 * (ceph_tcp_recv() would immediately return 1).
2822 */
2823 if (WARN_ON(!iov_iter_count(&con->v2.in_iter)))
2824 return -ENODATA;
2825
2826 for (;;) {
2827 ret = ceph_tcp_recv(con);
2828 if (ret <= 0)
2829 return ret;
2830
2831 ret = populate_in_iter(con);
2832 if (ret <= 0) {
2833 if (ret && ret != -EAGAIN && !con->error_msg)
2834 con->error_msg = "read processing error";
2835 return ret;
2836 }
2837 }
2838 }
2839
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[block:for-5.13/io_uring 110/116] fs/io_uring.c:5391:34: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.13/io_uring
head: f39c8a5b1130fe17db9c66d08aa473d9587543a9
commit: 9d8058926be7008c1dd49a4e5fb33044f17873c1 [110/116] io_uring: split poll and poll update structures
config: um-randconfig-s032-20210413 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/com...
git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags block for-5.13/io_uring
git checkout 9d8058926be7008c1dd49a4e5fb33044f17873c1
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=um
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 >>)
fs/io_uring.c:2918:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] __user * @@ got struct io_buffer *[assigned] kbuf @@
fs/io_uring.c:2918:24: sparse: expected void [noderef] __user *
fs/io_uring.c:2918:24: sparse: got struct io_buffer *[assigned] kbuf
fs/io_uring.c:4219:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *file @@ got struct file [noderef] __rcu * @@
fs/io_uring.c:4219:14: sparse: expected struct file *file
fs/io_uring.c:4219:14: sparse: got struct file [noderef] __rcu *
fs/io_uring.c:4824:72: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] mask @@
fs/io_uring.c:4824:72: sparse: expected int mask
fs/io_uring.c:4824:72: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:4828:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] result @@ got restricted __poll_t [usertype] mask @@
fs/io_uring.c:4828:21: sparse: expected unsigned int [usertype] result
fs/io_uring.c:4828:21: sparse: got restricted __poll_t [usertype] mask
fs/io_uring.c:4853:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] result @@ got restricted __poll_t @@
fs/io_uring.c:4853:29: sparse: expected unsigned int [usertype] result
fs/io_uring.c:4853:29: sparse: got restricted __poll_t
fs/io_uring.c:4934:49: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned int [usertype] result @@
fs/io_uring.c:4934:49: sparse: expected restricted __poll_t [usertype] mask
fs/io_uring.c:4934:49: sparse: got unsigned int [usertype] result
fs/io_uring.c:5083:41: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] @@
fs/io_uring.c:5083:41: sparse: expected int mask
fs/io_uring.c:5083:41: sparse: got restricted __poll_t [usertype]
fs/io_uring.c:5171:22: sparse: sparse: invalid assignment: |=
fs/io_uring.c:5171:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:5171:22: sparse: right side has type int
fs/io_uring.c:5173:22: sparse: sparse: invalid assignment: |=
fs/io_uring.c:5173:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:5173:22: sparse: right side has type int
fs/io_uring.c:5178:22: sparse: sparse: invalid assignment: &=
fs/io_uring.c:5178:22: sparse: left side has type restricted __poll_t
fs/io_uring.c:5178:22: sparse: right side has type int
fs/io_uring.c:5180:14: sparse: sparse: invalid assignment: |=
fs/io_uring.c:5180:14: sparse: left side has type restricted __poll_t
fs/io_uring.c:5180:14: sparse: right side has type int
fs/io_uring.c:5194:67: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected int mask @@ got restricted __poll_t [assigned] [usertype] mask @@
fs/io_uring.c:5194:67: sparse: expected int mask
fs/io_uring.c:5194:67: sparse: got restricted __poll_t [assigned] [usertype] mask
fs/io_uring.c:5195:52: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@
fs/io_uring.c:5195:52: sparse: expected int events
fs/io_uring.c:5195:52: sparse: got restricted __poll_t [usertype] events
fs/io_uring.c:5383:24: sparse: sparse: invalid assignment: |=
fs/io_uring.c:5383:24: sparse: left side has type unsigned int
fs/io_uring.c:5383:24: sparse: right side has type restricted __poll_t
fs/io_uring.c:5385:58: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:5384:31: sparse: sparse: restricted __poll_t degrades to integer
>> fs/io_uring.c:5391:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got unsigned int [assigned] [usertype] events @@
fs/io_uring.c:5391:34: sparse: expected restricted __poll_t [usertype] events
fs/io_uring.c:5391:34: sparse: got unsigned int [assigned] [usertype] events
fs/io_uring.c:5400:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got unsigned int [assigned] [usertype] events @@
fs/io_uring.c:5400:30: sparse: expected restricted __poll_t [usertype] events
fs/io_uring.c:5400:30: sparse: got unsigned int [assigned] [usertype] events
fs/io_uring.c:5472:35: sparse: sparse: invalid assignment: &=
fs/io_uring.c:5472:35: sparse: left side has type restricted __poll_t
fs/io_uring.c:5472:35: sparse: right side has type int
fs/io_uring.c:5473:54: sparse: sparse: restricted __poll_t degrades to integer
fs/io_uring.c:5473:35: sparse: sparse: invalid assignment: |=
fs/io_uring.c:5473:35: sparse: left side has type restricted __poll_t
fs/io_uring.c:5473:35: sparse: right side has type unsigned int
fs/io_uring.c:7233:9: sparse: sparse: context imbalance in 'io_sq_thread_unpark' - wrong count at exit
fs/io_uring.c:7244:9: sparse: sparse: context imbalance in 'io_sq_thread_park' - wrong count at exit
vim +5391 fs/io_uring.c
5365
5366 static int io_poll_add_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
5367 {
5368 u32 events, flags;
5369
5370 if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL))
5371 return -EINVAL;
5372 if (sqe->ioprio || sqe->buf_index)
5373 return -EINVAL;
5374 flags = READ_ONCE(sqe->len);
5375 if (flags & ~(IORING_POLL_ADD_MULTI | IORING_POLL_UPDATE_EVENTS |
5376 IORING_POLL_UPDATE_USER_DATA))
5377 return -EINVAL;
5378 events = READ_ONCE(sqe->poll32_events);
5379 #ifdef __BIG_ENDIAN
5380 events = swahw32(events);
5381 #endif
5382 if (!(flags & IORING_POLL_ADD_MULTI))
5383 events |= EPOLLONESHOT;
5384 events = demangle_poll(events) |
5385 (events & (EPOLLEXCLUSIVE|EPOLLONESHOT));
5386
5387 if (flags & (IORING_POLL_UPDATE_EVENTS|IORING_POLL_UPDATE_USER_DATA)) {
5388 struct io_poll_update *poll_upd = &req->poll_update;
5389
5390 req->flags |= REQ_F_POLL_UPDATE;
> 5391 poll_upd->events = events;
5392 poll_upd->old_user_data = READ_ONCE(sqe->addr);
5393 poll_upd->update_events = flags & IORING_POLL_UPDATE_EVENTS;
5394 poll_upd->update_user_data = flags & IORING_POLL_UPDATE_USER_DATA;
5395 if (poll_upd->update_user_data)
5396 poll_upd->new_user_data = READ_ONCE(sqe->off);
5397 } else {
5398 struct io_poll_iocb *poll = &req->poll;
5399
5400 poll->events = events;
5401 if (sqe->off || sqe->addr)
5402 return -EINVAL;
5403 }
5404 return 0;
5405 }
5406
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
net/ceph/messenger_v1.c:1351:5: warning: stack frame size of 1216 bytes in function 'ceph_con_v1_try_write'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: 2f713615ddd9d805b6c5e79c52e0e11af99d2bf1 libceph: move msgr1 protocol implementation to its own file
date: 4 months ago
config: powerpc64-randconfig-r014-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# 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 2f713615ddd9d805b6c5e79c52e0e11af99d2bf1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:12:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:14:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:16:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:18:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:20:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/ceph/messenger_v1.c:1351:5: warning: stack frame size of 1216 bytes in function 'ceph_con_v1_try_write' [-Wframe-larger-than=]
int ceph_con_v1_try_write(struct ceph_connection *con)
^
7 warnings generated.
vim +/ceph_con_v1_try_write +1351 net/ceph/messenger_v1.c
1346
1347 /*
1348 * Write something to the socket. Called in a worker thread when the
1349 * socket appears to be writeable and we have something ready to send.
1350 */
> 1351 int ceph_con_v1_try_write(struct ceph_connection *con)
1352 {
1353 int ret = 1;
1354
1355 dout("try_write start %p state %d\n", con, con->state);
1356 if (con->state != CEPH_CON_S_PREOPEN &&
1357 con->state != CEPH_CON_S_V1_BANNER &&
1358 con->state != CEPH_CON_S_V1_CONNECT_MSG &&
1359 con->state != CEPH_CON_S_OPEN)
1360 return 0;
1361
1362 /* open the socket first? */
1363 if (con->state == CEPH_CON_S_PREOPEN) {
1364 BUG_ON(con->sock);
1365 con->state = CEPH_CON_S_V1_BANNER;
1366
1367 con_out_kvec_reset(con);
1368 prepare_write_banner(con);
1369 prepare_read_banner(con);
1370
1371 BUG_ON(con->in_msg);
1372 con->in_tag = CEPH_MSGR_TAG_READY;
1373 dout("try_write initiating connect on %p new state %d\n",
1374 con, con->state);
1375 ret = ceph_tcp_connect(con);
1376 if (ret < 0) {
1377 con->error_msg = "connect error";
1378 goto out;
1379 }
1380 }
1381
1382 more:
1383 dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes);
1384 BUG_ON(!con->sock);
1385
1386 /* kvec data queued? */
1387 if (con->out_kvec_left) {
1388 ret = write_partial_kvec(con);
1389 if (ret <= 0)
1390 goto out;
1391 }
1392 if (con->out_skip) {
1393 ret = write_partial_skip(con);
1394 if (ret <= 0)
1395 goto out;
1396 }
1397
1398 /* msg pages? */
1399 if (con->out_msg) {
1400 if (con->out_msg_done) {
1401 ceph_msg_put(con->out_msg);
1402 con->out_msg = NULL; /* we're done with this one */
1403 goto do_next;
1404 }
1405
1406 ret = write_partial_message_data(con);
1407 if (ret == 1)
1408 goto more; /* we need to send the footer, too! */
1409 if (ret == 0)
1410 goto out;
1411 if (ret < 0) {
1412 dout("try_write write_partial_message_data err %d\n",
1413 ret);
1414 goto out;
1415 }
1416 }
1417
1418 do_next:
1419 if (con->state == CEPH_CON_S_OPEN) {
1420 if (ceph_con_flag_test_and_clear(con,
1421 CEPH_CON_F_KEEPALIVE_PENDING)) {
1422 prepare_write_keepalive(con);
1423 goto more;
1424 }
1425 /* is anything else pending? */
1426 if (!list_empty(&con->out_queue)) {
1427 prepare_write_message(con);
1428 goto more;
1429 }
1430 if (con->in_seq > con->in_seq_acked) {
1431 prepare_write_ack(con);
1432 goto more;
1433 }
1434 }
1435
1436 /* Nothing to do! */
1437 ceph_con_flag_clear(con, CEPH_CON_F_WRITE_PENDING);
1438 dout("try_write nothing else to write.\n");
1439 ret = 0;
1440 out:
1441 dout("try_write done on %p ret %d\n", con, ret);
1442 return ret;
1443 }
1444
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
drivers/gpu/drm/bridge/sil-sii8620.c:2355: undefined reference to `extcon_unregister_notifier'
by kernel test robot
Hi Masahiro,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: def2fbffe62c00c330c7f41584a356001179c59c kconfig: allow symbols implied by y to become m
date: 1 year, 1 month ago
config: x86_64-randconfig-r006-20210413 (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/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 def2fbffe62c00c330c7f41584a356001179c59c
# 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 >>):
ld: drivers/gpu/drm/bridge/sil-sii8620.o: in function `sii8620_remove':
>> drivers/gpu/drm/bridge/sil-sii8620.c:2355: undefined reference to `extcon_unregister_notifier'
ld: drivers/gpu/drm/bridge/sil-sii8620.o: in function `sii8620_extcon_init':
>> drivers/gpu/drm/bridge/sil-sii8620.c:2179: undefined reference to `extcon_find_edev_by_node'
>> ld: drivers/gpu/drm/bridge/sil-sii8620.c:2191: undefined reference to `extcon_register_notifier'
ld: drivers/gpu/drm/bridge/sil-sii8620.o: in function `sii8620_extcon_work':
>> drivers/gpu/drm/bridge/sil-sii8620.c:2139: undefined reference to `extcon_get_state'
vim +2355 drivers/gpu/drm/bridge/sil-sii8620.c
688838442147d9 Maciej Purski 2018-02-27 2162
688838442147d9 Maciej Purski 2018-02-27 2163 static int sii8620_extcon_init(struct sii8620 *ctx)
688838442147d9 Maciej Purski 2018-02-27 2164 {
688838442147d9 Maciej Purski 2018-02-27 2165 struct extcon_dev *edev;
688838442147d9 Maciej Purski 2018-02-27 2166 struct device_node *musb, *muic;
688838442147d9 Maciej Purski 2018-02-27 2167 int ret;
688838442147d9 Maciej Purski 2018-02-27 2168
688838442147d9 Maciej Purski 2018-02-27 2169 /* get micro-USB connector node */
688838442147d9 Maciej Purski 2018-02-27 2170 musb = of_graph_get_remote_node(ctx->dev->of_node, 1, -1);
688838442147d9 Maciej Purski 2018-02-27 2171 /* next get micro-USB Interface Controller node */
688838442147d9 Maciej Purski 2018-02-27 2172 muic = of_get_next_parent(musb);
688838442147d9 Maciej Purski 2018-02-27 2173
688838442147d9 Maciej Purski 2018-02-27 2174 if (!muic) {
688838442147d9 Maciej Purski 2018-02-27 2175 dev_info(ctx->dev, "no extcon found, switching to 'always on' mode\n");
688838442147d9 Maciej Purski 2018-02-27 2176 return 0;
688838442147d9 Maciej Purski 2018-02-27 2177 }
688838442147d9 Maciej Purski 2018-02-27 2178
688838442147d9 Maciej Purski 2018-02-27 @2179 edev = extcon_find_edev_by_node(muic);
688838442147d9 Maciej Purski 2018-02-27 2180 of_node_put(muic);
688838442147d9 Maciej Purski 2018-02-27 2181 if (IS_ERR(edev)) {
688838442147d9 Maciej Purski 2018-02-27 2182 if (PTR_ERR(edev) == -EPROBE_DEFER)
688838442147d9 Maciej Purski 2018-02-27 2183 return -EPROBE_DEFER;
688838442147d9 Maciej Purski 2018-02-27 2184 dev_err(ctx->dev, "Invalid or missing extcon\n");
688838442147d9 Maciej Purski 2018-02-27 2185 return PTR_ERR(edev);
688838442147d9 Maciej Purski 2018-02-27 2186 }
688838442147d9 Maciej Purski 2018-02-27 2187
688838442147d9 Maciej Purski 2018-02-27 2188 ctx->extcon = edev;
688838442147d9 Maciej Purski 2018-02-27 2189 ctx->extcon_nb.notifier_call = sii8620_extcon_notifier;
688838442147d9 Maciej Purski 2018-02-27 2190 INIT_WORK(&ctx->extcon_wq, sii8620_extcon_work);
688838442147d9 Maciej Purski 2018-02-27 @2191 ret = extcon_register_notifier(edev, EXTCON_DISP_MHL, &ctx->extcon_nb);
688838442147d9 Maciej Purski 2018-02-27 2192 if (ret) {
688838442147d9 Maciej Purski 2018-02-27 2193 dev_err(ctx->dev, "failed to register notifier for MHL\n");
688838442147d9 Maciej Purski 2018-02-27 2194 return ret;
688838442147d9 Maciej Purski 2018-02-27 2195 }
688838442147d9 Maciej Purski 2018-02-27 2196
688838442147d9 Maciej Purski 2018-02-27 2197 return 0;
688838442147d9 Maciej Purski 2018-02-27 2198 }
688838442147d9 Maciej Purski 2018-02-27 2199
ce6e153f414a73 Andrzej Hajda 2016-10-10 2200 static inline struct sii8620 *bridge_to_sii8620(struct drm_bridge *bridge)
ce6e153f414a73 Andrzej Hajda 2016-10-10 2201 {
ce6e153f414a73 Andrzej Hajda 2016-10-10 2202 return container_of(bridge, struct sii8620, bridge);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2203 }
ce6e153f414a73 Andrzej Hajda 2016-10-10 2204
e25f1f7c94e16d Maciej Purski 2017-08-24 2205 static int sii8620_attach(struct drm_bridge *bridge)
e25f1f7c94e16d Maciej Purski 2017-08-24 2206 {
e25f1f7c94e16d Maciej Purski 2017-08-24 2207 struct sii8620 *ctx = bridge_to_sii8620(bridge);
e25f1f7c94e16d Maciej Purski 2017-08-24 2208
e25f1f7c94e16d Maciej Purski 2017-08-24 2209 sii8620_init_rcp_input_dev(ctx);
e25f1f7c94e16d Maciej Purski 2017-08-24 2210
e25f1f7c94e16d Maciej Purski 2017-08-24 2211 return sii8620_clear_error(ctx);
e25f1f7c94e16d Maciej Purski 2017-08-24 2212 }
e25f1f7c94e16d Maciej Purski 2017-08-24 2213
e25f1f7c94e16d Maciej Purski 2017-08-24 2214 static void sii8620_detach(struct drm_bridge *bridge)
e25f1f7c94e16d Maciej Purski 2017-08-24 2215 {
e25f1f7c94e16d Maciej Purski 2017-08-24 2216 struct sii8620 *ctx = bridge_to_sii8620(bridge);
e25f1f7c94e16d Maciej Purski 2017-08-24 2217
710abfe8ead247 Ronald Tschalär 2019-04-19 2218 if (!IS_ENABLED(CONFIG_RC_CORE))
710abfe8ead247 Ronald Tschalär 2019-04-19 2219 return;
710abfe8ead247 Ronald Tschalär 2019-04-19 2220
e25f1f7c94e16d Maciej Purski 2017-08-24 2221 rc_unregister_device(ctx->rc_dev);
e25f1f7c94e16d Maciej Purski 2017-08-24 2222 }
e25f1f7c94e16d Maciej Purski 2017-08-24 2223
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2224 static int sii8620_is_packing_required(struct sii8620 *ctx,
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2225 const struct drm_display_mode *mode)
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2226 {
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2227 int max_pclk, max_pclk_pp_mode;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2228
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2229 if (sii8620_is_mhl3(ctx)) {
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2230 max_pclk = MHL3_MAX_PCLK;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2231 max_pclk_pp_mode = MHL3_MAX_PCLK_PP_MODE;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2232 } else {
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2233 max_pclk = MHL1_MAX_PCLK;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2234 max_pclk_pp_mode = MHL1_MAX_PCLK_PP_MODE;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2235 }
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2236
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2237 if (mode->clock < max_pclk)
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2238 return 0;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2239 else if (mode->clock < max_pclk_pp_mode)
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2240 return 1;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2241 else
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2242 return -1;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2243 }
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2244
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2245 static enum drm_mode_status sii8620_mode_valid(struct drm_bridge *bridge,
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2246 const struct drm_display_mode *mode)
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2247 {
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2248 struct sii8620 *ctx = bridge_to_sii8620(bridge);
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2249 int pack_required = sii8620_is_packing_required(ctx, mode);
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2250 bool can_pack = ctx->devcap[MHL_DCAP_VID_LINK_MODE] &
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2251 MHL_DCAP_VID_LINK_PPIXEL;
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2252
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2253 switch (pack_required) {
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2254 case 0:
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2255 return MODE_OK;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2256 case 1:
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2257 return (can_pack) ? MODE_OK : MODE_CLOCK_HIGH;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2258 default:
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2259 return MODE_CLOCK_HIGH;
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2260 }
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2261 }
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2262
ce6e153f414a73 Andrzej Hajda 2016-10-10 2263 static bool sii8620_mode_fixup(struct drm_bridge *bridge,
ce6e153f414a73 Andrzej Hajda 2016-10-10 2264 const struct drm_display_mode *mode,
ce6e153f414a73 Andrzej Hajda 2016-10-10 2265 struct drm_display_mode *adjusted_mode)
ce6e153f414a73 Andrzej Hajda 2016-10-10 2266 {
ce6e153f414a73 Andrzej Hajda 2016-10-10 2267 struct sii8620 *ctx = bridge_to_sii8620(bridge);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2268
bf1722cab55a32 Andrzej Hajda 2017-02-01 2269 mutex_lock(&ctx->lock);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2270
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2271 ctx->use_packed_pixel = sii8620_is_packing_required(ctx, adjusted_mode);
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2272
ce6e153f414a73 Andrzej Hajda 2016-10-10 2273 mutex_unlock(&ctx->lock);
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2274
ecba7cfa3afbe4 Maciej Purski 2018-02-02 2275 return true;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2276 }
ce6e153f414a73 Andrzej Hajda 2016-10-10 2277
ce6e153f414a73 Andrzej Hajda 2016-10-10 2278 static const struct drm_bridge_funcs sii8620_bridge_funcs = {
e25f1f7c94e16d Maciej Purski 2017-08-24 2279 .attach = sii8620_attach,
e25f1f7c94e16d Maciej Purski 2017-08-24 2280 .detach = sii8620_detach,
ce6e153f414a73 Andrzej Hajda 2016-10-10 2281 .mode_fixup = sii8620_mode_fixup,
e7c2e4d368e2ef Marek Szyprowski 2017-11-09 2282 .mode_valid = sii8620_mode_valid,
ce6e153f414a73 Andrzej Hajda 2016-10-10 2283 };
ce6e153f414a73 Andrzej Hajda 2016-10-10 2284
ce6e153f414a73 Andrzej Hajda 2016-10-10 2285 static int sii8620_probe(struct i2c_client *client,
ce6e153f414a73 Andrzej Hajda 2016-10-10 2286 const struct i2c_device_id *id)
ce6e153f414a73 Andrzej Hajda 2016-10-10 2287 {
ce6e153f414a73 Andrzej Hajda 2016-10-10 2288 struct device *dev = &client->dev;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2289 struct sii8620 *ctx;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2290 int ret;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2291
ce6e153f414a73 Andrzej Hajda 2016-10-10 2292 ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2293 if (!ctx)
ce6e153f414a73 Andrzej Hajda 2016-10-10 2294 return -ENOMEM;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2295
ce6e153f414a73 Andrzej Hajda 2016-10-10 2296 ctx->dev = dev;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2297 mutex_init(&ctx->lock);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2298 INIT_LIST_HEAD(&ctx->mt_queue);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2299
ce6e153f414a73 Andrzej Hajda 2016-10-10 2300 ctx->clk_xtal = devm_clk_get(dev, "xtal");
ce6e153f414a73 Andrzej Hajda 2016-10-10 2301 if (IS_ERR(ctx->clk_xtal)) {
ce6e153f414a73 Andrzej Hajda 2016-10-10 2302 dev_err(dev, "failed to get xtal clock from DT\n");
ce6e153f414a73 Andrzej Hajda 2016-10-10 2303 return PTR_ERR(ctx->clk_xtal);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2304 }
ce6e153f414a73 Andrzej Hajda 2016-10-10 2305
ce6e153f414a73 Andrzej Hajda 2016-10-10 2306 if (!client->irq) {
ce6e153f414a73 Andrzej Hajda 2016-10-10 2307 dev_err(dev, "no irq provided\n");
ce6e153f414a73 Andrzej Hajda 2016-10-10 2308 return -EINVAL;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2309 }
ce6e153f414a73 Andrzej Hajda 2016-10-10 2310 irq_set_status_flags(client->irq, IRQ_NOAUTOEN);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2311 ret = devm_request_threaded_irq(dev, client->irq, NULL,
ce6e153f414a73 Andrzej Hajda 2016-10-10 2312 sii8620_irq_thread,
ce6e153f414a73 Andrzej Hajda 2016-10-10 2313 IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
ce6e153f414a73 Andrzej Hajda 2016-10-10 2314 "sii8620", ctx);
e0ba12ea5e1329 Andrzej Hajda 2017-02-22 2315 if (ret < 0) {
e0ba12ea5e1329 Andrzej Hajda 2017-02-22 2316 dev_err(dev, "failed to install IRQ handler\n");
e0ba12ea5e1329 Andrzej Hajda 2017-02-22 2317 return ret;
e0ba12ea5e1329 Andrzej Hajda 2017-02-22 2318 }
ce6e153f414a73 Andrzej Hajda 2016-10-10 2319
ce6e153f414a73 Andrzej Hajda 2016-10-10 2320 ctx->gpio_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2321 if (IS_ERR(ctx->gpio_reset)) {
ce6e153f414a73 Andrzej Hajda 2016-10-10 2322 dev_err(dev, "failed to get reset gpio from DT\n");
ce6e153f414a73 Andrzej Hajda 2016-10-10 2323 return PTR_ERR(ctx->gpio_reset);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2324 }
ce6e153f414a73 Andrzej Hajda 2016-10-10 2325
ce6e153f414a73 Andrzej Hajda 2016-10-10 2326 ctx->supplies[0].supply = "cvcc10";
ce6e153f414a73 Andrzej Hajda 2016-10-10 2327 ctx->supplies[1].supply = "iovcc18";
ce6e153f414a73 Andrzej Hajda 2016-10-10 2328 ret = devm_regulator_bulk_get(dev, 2, ctx->supplies);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2329 if (ret)
ce6e153f414a73 Andrzej Hajda 2016-10-10 2330 return ret;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2331
688838442147d9 Maciej Purski 2018-02-27 2332 ret = sii8620_extcon_init(ctx);
688838442147d9 Maciej Purski 2018-02-27 2333 if (ret < 0) {
688838442147d9 Maciej Purski 2018-02-27 2334 dev_err(ctx->dev, "failed to initialize EXTCON\n");
688838442147d9 Maciej Purski 2018-02-27 2335 return ret;
688838442147d9 Maciej Purski 2018-02-27 2336 }
688838442147d9 Maciej Purski 2018-02-27 2337
ce6e153f414a73 Andrzej Hajda 2016-10-10 2338 i2c_set_clientdata(client, ctx);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2339
ce6e153f414a73 Andrzej Hajda 2016-10-10 2340 ctx->bridge.funcs = &sii8620_bridge_funcs;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2341 ctx->bridge.of_node = dev->of_node;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2342 drm_bridge_add(&ctx->bridge);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2343
688838442147d9 Maciej Purski 2018-02-27 2344 if (!ctx->extcon)
ce6e153f414a73 Andrzej Hajda 2016-10-10 2345 sii8620_cable_in(ctx);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2346
ce6e153f414a73 Andrzej Hajda 2016-10-10 2347 return 0;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2348 }
ce6e153f414a73 Andrzej Hajda 2016-10-10 2349
ce6e153f414a73 Andrzej Hajda 2016-10-10 2350 static int sii8620_remove(struct i2c_client *client)
ce6e153f414a73 Andrzej Hajda 2016-10-10 2351 {
ce6e153f414a73 Andrzej Hajda 2016-10-10 2352 struct sii8620 *ctx = i2c_get_clientdata(client);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2353
688838442147d9 Maciej Purski 2018-02-27 2354 if (ctx->extcon) {
688838442147d9 Maciej Purski 2018-02-27 @2355 extcon_unregister_notifier(ctx->extcon, EXTCON_DISP_MHL,
688838442147d9 Maciej Purski 2018-02-27 2356 &ctx->extcon_nb);
688838442147d9 Maciej Purski 2018-02-27 2357 flush_work(&ctx->extcon_wq);
688838442147d9 Maciej Purski 2018-02-27 2358 if (ctx->cable_state > 0)
688838442147d9 Maciej Purski 2018-02-27 2359 sii8620_cable_out(ctx);
688838442147d9 Maciej Purski 2018-02-27 2360 } else {
688838442147d9 Maciej Purski 2018-02-27 2361 sii8620_cable_out(ctx);
688838442147d9 Maciej Purski 2018-02-27 2362 }
e25f1f7c94e16d Maciej Purski 2017-08-24 2363 drm_bridge_remove(&ctx->bridge);
ce6e153f414a73 Andrzej Hajda 2016-10-10 2364
ce6e153f414a73 Andrzej Hajda 2016-10-10 2365 return 0;
ce6e153f414a73 Andrzej Hajda 2016-10-10 2366 }
ce6e153f414a73 Andrzej Hajda 2016-10-10 2367
:::::: The code at line 2355 was first introduced by commit
:::::: 688838442147d9dd94c2ef7c2c31a35cf150c5fa drm/bridge/sii8620: use micro-USB cable detection logic to detect MHL
:::::: TO: Maciej Purski <m.purski(a)samsung.com>
:::::: CC: Chanwoo Choi <cw00.choi(a)samsung.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH V4 2/2] net: ethernet: ravb: Enable optional refclk
by Dan Carpenter
Hi Adam,
url: https://github.com/0day-ci/linux/commits/Adam-Ford/dt-bindings-net-renesa...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 6628ddfec7580882f11fdc5c194a8ea781fdadfa
config: m68k-randconfig-m031-20210412 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/ethernet/renesas/ravb_main.c:2254 ravb_probe() error: potentially dereferencing uninitialized 'priv'.
vim +/priv +2254 drivers/net/ethernet/renesas/ravb_main.c
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2043 static int ravb_probe(struct platform_device *pdev)
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2044 {
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2045 struct device_node *np = pdev->dev.of_node;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2046 struct ravb_private *priv;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2047 enum ravb_chip_id chip_id;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2048 struct net_device *ndev;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2049 int error, irq, q;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2050 struct resource *res;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2051 int i;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2052
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2053 if (!np) {
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2054 dev_err(&pdev->dev,
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2055 "this driver is required to be instantiated from device tree\n");
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2056 return -EINVAL;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2057 }
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2058
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2059 /* Get base address */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2060 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2061 if (!res) {
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2062 dev_err(&pdev->dev, "invalid resource\n");
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2063 return -EINVAL;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2064 }
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2065
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2066 ndev = alloc_etherdev_mqs(sizeof(struct ravb_private),
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2067 NUM_TX_QUEUE, NUM_RX_QUEUE);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2068 if (!ndev)
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2069 return -ENOMEM;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2070
4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2017-10-04 2071 ndev->features = NETIF_F_RXCSUM;
4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2017-10-04 2072 ndev->hw_features = NETIF_F_RXCSUM;
4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2017-10-04 2073
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2074 pm_runtime_enable(&pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2075 pm_runtime_get_sync(&pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2076
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2077 /* The Ether-specific entries in the device structure. */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2078 ndev->base_addr = res->start;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2079
e866863066a4e6 drivers/net/ethernet/renesas/ravb_main.c Wolfram Sang 2016-03-01 2080 chip_id = (enum ravb_chip_id)of_device_get_match_data(&pdev->dev);
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2081
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2082 if (chip_id == RCAR_GEN3)
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2083 irq = platform_get_irq_byname(pdev, "ch22");
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2084 else
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2085 irq = platform_get_irq(pdev, 0);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2086 if (irq < 0) {
f375339e497582 drivers/net/ethernet/renesas/ravb_main.c Sergei Shtylyov 2015-08-28 2087 error = irq;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2088 goto out_release;
^^^^^^^^^^^^^^^^^
"priv" not initialized on this error path.
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2089 }
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2090 ndev->irq = irq;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2091
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2092 SET_NETDEV_DEV(ndev, &pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2093
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2094 priv = netdev_priv(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2095 priv->ndev = ndev;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2096 priv->pdev = pdev;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2097 priv->num_tx_ring[RAVB_BE] = BE_TX_RING_SIZE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2098 priv->num_rx_ring[RAVB_BE] = BE_RX_RING_SIZE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2099 priv->num_tx_ring[RAVB_NC] = NC_TX_RING_SIZE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2100 priv->num_rx_ring[RAVB_NC] = NC_RX_RING_SIZE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2101 priv->addr = devm_ioremap_resource(&pdev->dev, res);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2102 if (IS_ERR(priv->addr)) {
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2103 error = PTR_ERR(priv->addr);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2104 goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2105 }
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2106
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2107 spin_lock_init(&priv->lock);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2108 INIT_WORK(&priv->work, ravb_tx_timeout_work);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2109
0c65b2b90d13c1 drivers/net/ethernet/renesas/ravb_main.c Andrew Lunn 2019-11-04 2110 error = of_get_phy_mode(np, &priv->phy_interface);
0c65b2b90d13c1 drivers/net/ethernet/renesas/ravb_main.c Andrew Lunn 2019-11-04 2111 if (error && error != -ENODEV)
0c65b2b90d13c1 drivers/net/ethernet/renesas/ravb_main.c Andrew Lunn 2019-11-04 2112 goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2113
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2114 priv->no_avb_link = of_property_read_bool(np, "renesas,no-ether-link");
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2115 priv->avb_link_active_low =
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2116 of_property_read_bool(np, "renesas,ether-link-active-low");
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2117
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2118 if (chip_id == RCAR_GEN3) {
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2119 irq = platform_get_irq_byname(pdev, "ch24");
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2120 if (irq < 0) {
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2121 error = irq;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2122 goto out_release;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2123 }
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2124 priv->emac_irq = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2125 for (i = 0; i < NUM_RX_QUEUE; i++) {
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2126 irq = platform_get_irq_byname(pdev, ravb_rx_irqs[i]);
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2127 if (irq < 0) {
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2128 error = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2129 goto out_release;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2130 }
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2131 priv->rx_irqs[i] = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2132 }
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2133 for (i = 0; i < NUM_TX_QUEUE; i++) {
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2134 irq = platform_get_irq_byname(pdev, ravb_tx_irqs[i]);
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2135 if (irq < 0) {
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2136 error = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2137 goto out_release;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2138 }
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2139 priv->tx_irqs[i] = irq;
f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2140 }
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2141 }
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2142
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2143 priv->chip_id = chip_id;
22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2144
3e3d647715d401 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund 2017-08-01 2145 priv->clk = devm_clk_get(&pdev->dev, NULL);
ab104615e01c2c drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2017-10-12 2146 if (IS_ERR(priv->clk)) {
ab104615e01c2c drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2017-10-12 2147 error = PTR_ERR(priv->clk);
ab104615e01c2c drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2017-10-12 2148 goto out_release;
ab104615e01c2c drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2017-10-12 2149 }
3e3d647715d401 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund 2017-08-01 2150
8f9e50a484ae35 drivers/net/ethernet/renesas/ravb_main.c Adam Ford 2021-04-12 2151 priv->refclk = devm_clk_get_optional(&pdev->dev, "refclk");
8f9e50a484ae35 drivers/net/ethernet/renesas/ravb_main.c Adam Ford 2021-04-12 2152 if (IS_ERR(priv->refclk)) {
8f9e50a484ae35 drivers/net/ethernet/renesas/ravb_main.c Adam Ford 2021-04-12 2153 error = PTR_ERR(priv->refclk);
8f9e50a484ae35 drivers/net/ethernet/renesas/ravb_main.c Adam Ford 2021-04-12 2154 goto out_release;
8f9e50a484ae35 drivers/net/ethernet/renesas/ravb_main.c Adam Ford 2021-04-12 2155 }
8f9e50a484ae35 drivers/net/ethernet/renesas/ravb_main.c Adam Ford 2021-04-12 2156 clk_prepare_enable(priv->refclk);
8f9e50a484ae35 drivers/net/ethernet/renesas/ravb_main.c Adam Ford 2021-04-12 2157
75efa06f457bbe drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund 2018-02-16 2158 ndev->max_mtu = 2048 - (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN);
75efa06f457bbe drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund 2018-02-16 2159 ndev->min_mtu = ETH_MIN_MTU;
75efa06f457bbe drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund 2018-02-16 2160
f543305da9b5a5 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2018-09-19 2161 priv->num_tx_desc = chip_id == RCAR_GEN2 ?
f543305da9b5a5 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2018-09-19 2162 NUM_TX_DESC_GEN2 : NUM_TX_DESC_GEN3;
f543305da9b5a5 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2018-09-19 2163
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2164 /* Set function */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2165 ndev->netdev_ops = &ravb_netdev_ops;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2166 ndev->ethtool_ops = &ravb_ethtool_ops;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2167
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2168 /* Set AVB config mode */
0184165b2f42c4 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund 2016-08-03 2169 ravb_set_config_mode(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2170
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2171 /* Set GTI value */
b3d39a8805c510 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2015-11-20 2172 error = ravb_set_gti(ndev);
b3d39a8805c510 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2015-11-20 2173 if (error)
b3d39a8805c510 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2015-11-20 2174 goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2175
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2176 /* Request GTI loading */
568b3ce7a8efdc drivers/net/ethernet/renesas/ravb_main.c Sergei Shtylyov 2016-02-10 2177 ravb_modify(ndev, GCCR, GCCR_LTI, GCCR_LTI);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2178
ce19a9eb53be2f drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-10-01 2179 if (priv->chip_id != RCAR_GEN2) {
a6f51f2efa742d drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-10-01 2180 ravb_parse_delay_mode(np, ndev);
61fccb2d6274f7 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2017-01-27 2181 ravb_set_delay_mode(ndev);
ce19a9eb53be2f drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-10-01 2182 }
61fccb2d6274f7 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2017-01-27 2183
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2184 /* Allocate descriptor base address table */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2185 priv->desc_bat_size = sizeof(struct ravb_desc) * DBAT_ENTRY_NUM;
e2dbb33ad9545d drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2186 priv->desc_bat = dma_alloc_coherent(ndev->dev.parent, priv->desc_bat_size,
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2187 &priv->desc_bat_dma, GFP_KERNEL);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2188 if (!priv->desc_bat) {
c451113291c193 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2015-11-02 2189 dev_err(&pdev->dev,
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2190 "Cannot allocate desc base address table (size %d bytes)\n",
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2191 priv->desc_bat_size);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2192 error = -ENOMEM;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2193 goto out_release;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2194 }
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2195 for (q = RAVB_BE; q < DBAT_ENTRY_NUM; q++)
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2196 priv->desc_bat[q].die_dt = DT_EOS;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2197 ravb_write(ndev, priv->desc_bat_dma, DBAT);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2198
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2199 /* Initialise HW timestamp list */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2200 INIT_LIST_HEAD(&priv->ts_skb_list);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2201
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-12-02 2202 /* Initialise PTP Clock driver */
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-12-02 2203 if (chip_id != RCAR_GEN2)
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-12-02 2204 ravb_ptp_init(ndev, pdev);
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-12-02 2205
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2206 /* Debug message level */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2207 priv->msg_enable = RAVB_DEF_MSG_ENABLE;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2208
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2209 /* Read and set MAC address */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2210 ravb_read_mac_address(ndev, of_get_mac_address(np));
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2211 if (!is_valid_ether_addr(ndev->dev_addr)) {
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2212 dev_warn(&pdev->dev,
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2213 "no valid MAC address supplied, using a random one\n");
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2214 eth_hw_addr_random(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2215 }
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2216
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2217 /* MDIO bus init */
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2218 error = ravb_mdio_init(priv);
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2219 if (error) {
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2220 dev_err(&pdev->dev, "failed to initialize MDIO\n");
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2221 goto out_dma_free;
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2222 }
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2223
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2224 netif_napi_add(ndev, &priv->napi[RAVB_BE], ravb_poll, 64);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2225 netif_napi_add(ndev, &priv->napi[RAVB_NC], ravb_poll, 64);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2226
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2227 /* Network device register */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2228 error = register_netdev(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2229 if (error)
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2230 goto out_napi_del;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2231
3e3d647715d401 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund 2017-08-01 2232 device_set_wakeup_capable(&pdev->dev, 1);
3e3d647715d401 drivers/net/ethernet/renesas/ravb_main.c Niklas Söderlund 2017-08-01 2233
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2234 /* Print device information */
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2235 netdev_info(ndev, "Base address at %#x, %pM, IRQ %d.\n",
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2236 (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2237
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2238 platform_set_drvdata(pdev, ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2239
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2240 return 0;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2241
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2242 out_napi_del:
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2243 netif_napi_del(&priv->napi[RAVB_NC]);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2244 netif_napi_del(&priv->napi[RAVB_BE]);
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2245 ravb_mdio_release(priv);
77972b55fb9d35 drivers/net/ethernet/renesas/ravb_main.c Geert Uytterhoeven 2020-09-22 2246 out_dma_free:
e2dbb33ad9545d drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2247 dma_free_coherent(ndev->dev.parent, priv->desc_bat_size, priv->desc_bat,
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2248 priv->desc_bat_dma);
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-12-02 2249
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-12-02 2250 /* Stop PTP Clock driver */
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-12-02 2251 if (chip_id != RCAR_GEN2)
f5d7837f96e53a drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-12-02 2252 ravb_ptp_stop(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2253 out_release:
8f9e50a484ae35 drivers/net/ethernet/renesas/ravb_main.c Adam Ford 2021-04-12 @2254 clk_disable_unprepare(priv->refclk);
^^^^^^^^^^^^
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2255 free_netdev(ndev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2256
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2257 pm_runtime_put(&pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2258 pm_runtime_disable(&pdev->dev);
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2259 return error;
c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2260 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[agd5f:s0ix-8 207/212] drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency2'.
by Dan Carpenter
tree: https://gitlab.freedesktop.org/agd5f/linux.git s0ix-8
head: 050ed943b1107b59b68db42e0c50586ea5055ce8
commit: 026d186e4592c1ee9c1cb44295912d0294508725 [207/212] ACPI / idle: override and update c-state latency when not conformance with s0ix
config: i386-randconfig-m021-20210413 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency2'.
drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency3'.
Old smatch warnings:
drivers/acpi/processor_idle.c:77 set_max_cstate() warn: argument 3 to %ld specifier is cast from pointer
vim +/latency2 +435 drivers/acpi/processor_idle.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 395 static int acpi_processor_power_verify(struct acpi_processor *pr)
^1da177e4c3f41 Linus Torvalds 2005-04-16 396 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 397 unsigned int i;
^1da177e4c3f41 Linus Torvalds 2005-04-16 398 unsigned int working = 0;
026d186e4592c1 Prike.Liang 2021-02-26 399 u32 latency2, latency3;
^^^^^^^^^^^^^^^^^^^^^^
6eb0a0fd059598 Venkatesh Pallipadi 2006-01-11 400
169a0abbe32813 Thomas Gleixner 2007-02-16 401 pr->power.timer_broadcast_on_state = INT_MAX;
6eb0a0fd059598 Venkatesh Pallipadi 2006-01-11 402
a0bf284bfedd6d Len Brown 2009-05-15 403 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 404 struct acpi_processor_cx *cx = &pr->power.states[i];
^1da177e4c3f41 Linus Torvalds 2005-04-16 405
^1da177e4c3f41 Linus Torvalds 2005-04-16 406 switch (cx->type) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 407 case ACPI_STATE_C1:
^1da177e4c3f41 Linus Torvalds 2005-04-16 408 cx->valid = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 409 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 410
^1da177e4c3f41 Linus Torvalds 2005-04-16 411 case ACPI_STATE_C2:
d22edd293ff3f1 Len Brown 2010-01-19 412 if (!cx->address)
d22edd293ff3f1 Len Brown 2010-01-19 413 break;
d22edd293ff3f1 Len Brown 2010-01-19 414 cx->valid = 1;
026d186e4592c1 Prike.Liang 2021-02-26 415 latency2 = cx->latency;
^^^^^^^^^^^^^^^^^^^^^^
^1da177e4c3f41 Linus Torvalds 2005-04-16 416 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 417
^1da177e4c3f41 Linus Torvalds 2005-04-16 418 case ACPI_STATE_C3:
026d186e4592c1 Prike.Liang 2021-02-26 419 latency3 = cx->latency;
^^^^^^^^^^^^^^^^^^^^^^^
^1da177e4c3f41 Linus Torvalds 2005-04-16 420 acpi_processor_power_verify_c3(pr, cx);
^1da177e4c3f41 Linus Torvalds 2005-04-16 421 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 422 }
7e275cc4e8e20f Len Brown 2009-05-15 423 if (!cx->valid)
7e275cc4e8e20f Len Brown 2009-05-15 424 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 425
7e275cc4e8e20f Len Brown 2009-05-15 426 lapic_timer_check_state(i, pr, cx);
7e275cc4e8e20f Len Brown 2009-05-15 427 tsc_check_state(cx->type);
^1da177e4c3f41 Linus Torvalds 2005-04-16 428 working++;
^1da177e4c3f41 Linus Torvalds 2005-04-16 429 }
bd6633476922b7 Andi Kleen 2006-03-25 430
026d186e4592c1 Prike.Liang 2021-02-26 431 /* Some AMD BIOSes mistakenly have higher C2 latencies than C3 latencies.
026d186e4592c1 Prike.Liang 2021-02-26 432 * In order to properly support S0ix, the platform needs to not skip C states.
026d186e4592c1 Prike.Liang 2021-02-26 433 * Correct the latencies here.
026d186e4592c1 Prike.Liang 2021-02-26 434 */
026d186e4592c1 Prike.Liang 2021-02-26 @435 if (acpi_processor_vendor_amd() && (latency2 >= latency3)) {
Probably if you know a lot about AMD and ACPI specs then you can
determine that these are initialized, but static checkers only see the
code.
026d186e4592c1 Prike.Liang 2021-02-26 436 pr->power.states[2].latency = 18;
026d186e4592c1 Prike.Liang 2021-02-26 437 pr->power.states[3].latency = 350;
026d186e4592c1 Prike.Liang 2021-02-26 438 }
026d186e4592c1 Prike.Liang 2021-02-26 439
918aae42aa9b61 Hidetoshi Seto 2009-12-14 440 lapic_timer_propagate_broadcast(pr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 441
^1da177e4c3f41 Linus Torvalds 2005-04-16 442 return (working);
^1da177e4c3f41 Linus Torvalds 2005-04-16 443 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v2 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp
by kernel test robot
Hi Waiman,
I love your patch! Perhaps something to improve:
[auto build test WARNING on dennis-percpu/for-next]
[also build test WARNING on linus/master v5.12-rc7 next-20210413]
[cannot apply to hnaz-linux-mm/master]
[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/Waiman-Long/mm-memcg-Reduce-kmem...
base: https://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-next
config: mips-randconfig-r031-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/565fa80b02eeb06c48a88ac6354a4fc9e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Waiman-Long/mm-memcg-Reduce-kmemcache-memory-accounting-overhead/20210413-065659
git checkout 565fa80b02eeb06c48a88ac6354a4fc9e5addd06
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from mm/mempool.c:22:
>> mm/slab.h:401:13: warning: unused function 'mod_obj_stock_state' [-Wunused-function]
static void mod_obj_stock_state(struct obj_cgroup *objcg,
^
1 warning generated.
--
In file included from mm/oom_kill.c:49:
>> mm/slab.h:401:13: warning: unused function 'mod_obj_stock_state'
static void mod_obj_stock_state(struct obj_cgroup
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 105, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $1
or $0, $2
sc $0, $1
beqz $0, 1b
.set pop
'
clang-13: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 13.0.0 (git://gitmirror/llvm_project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-9829f5e6b1/bin
clang-13: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm scripts security sound source usr virt
--
In file included from mm/slab_common.c:33:
>> mm/slab.h:401:13: warning: unused function 'mod_obj_stock_state'
static void mod_obj_stock_state(struct obj_cgroup
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h", .line = 153, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $1 # atomic_add
addu $0, $2
sc $0, $1
beqz $0, 1b
.set pop
'
clang-13: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 13.0.0 (git://gitmirror/llvm_project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-9829f5e6b1/bin
clang-13: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm scripts security sound source usr virt
--
In file included from mm/slub.c:20:
>> mm/slab.h:401:13: warning: unused function 'mod_obj_stock_state'
static void mod_obj_stock_state(struct obj_cgroup
^
mm/slub.c:1503:29: warning: unused function 'node_nr_slabs'
static inline unsigned long node_nr_slabs(struct kmem_cache_node
^
mm/slub.c:1521:21: warning: unused function 'kmalloc_large_node_hook'
static inline void size_t size, gfp_t flags)
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 192, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $2
or $1, $0, $3
sc $1, $2
beqz $1, 1b
.set pop
'
clang-13: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 13.0.0 (git://gitmirror/llvm_project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-9829f5e6b1/bin
clang-13: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm scripts security sound source usr virt
vim +/mod_obj_stock_state +401 mm/slab.h
400
> 401 static void mod_obj_stock_state(struct obj_cgroup *objcg,
402 struct pglist_data *pgdat, int idx, int nr)
403 {
404 }
405 #endif /* CONFIG_MEMCG_KMEM */
406
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
net/wireless/reg.c:2425:13: warning: stack frame size of 1152 bytes in function 'wiphy_update_regulatory'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: c637693b20da8706b7f48d96882c9c80ae935151 ubsan: remove UBSAN_MISC in favor of individual options
date: 4 months ago
config: powerpc64-randconfig-r014-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# 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 c637693b20da8706b7f48d96882c9c80ae935151
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:16:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/wireless/reg.c:60:
In file included from include/net/cfg80211.h:13:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:18:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/wireless/reg.c:60:
In file included from include/net/cfg80211.h:13:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:20:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/wireless/reg.c:60:
In file included from include/net/cfg80211.h:13:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:22:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/wireless/reg.c:60:
In file included from include/net/cfg80211.h:13:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:24:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/wireless/reg.c:2425:13: warning: stack frame size of 1152 bytes in function 'wiphy_update_regulatory' [-Wframe-larger-than=]
static void wiphy_update_regulatory(struct wiphy *wiphy,
^
7 warnings generated.
--
In file included from net/bluetooth/rfcomm/core.c:33:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:216:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/bluetooth/rfcomm/core.c:33:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:218:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/bluetooth/rfcomm/core.c:33:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:220:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/bluetooth/rfcomm/core.c:33:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:222:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/bluetooth/rfcomm/core.c:33:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:224:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/bluetooth/rfcomm/core.c:1975:13: warning: stack frame size of 1504 bytes in function 'rfcomm_process_sessions' [-Wframe-larger-than=]
static void rfcomm_process_sessions(void)
^
7 warnings generated.
vim +/wiphy_update_regulatory +2425 net/wireless/reg.c
ad932f046fbe98 Arik Nemtsov 2014-11-27 2424
eac03e381957a0 Sven Neumann 2011-08-30 @2425 static void wiphy_update_regulatory(struct wiphy *wiphy,
7db90f4a25bd41 Luis R. Rodriguez 2009-03-09 2426 enum nl80211_reg_initiator initiator)
b2e1b30290539b Luis R. Rodriguez 2008-09-09 2427 {
57fbcce37be7c1 Johannes Berg 2016-04-12 2428 enum nl80211_band band;
c492db370c17c4 Johannes Berg 2012-12-06 2429 struct regulatory_request *lr = get_last_request();
eac03e381957a0 Sven Neumann 2011-08-30 2430
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2431 if (ignore_reg_update(wiphy, initiator)) {
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2432 /*
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2433 * Regulatory updates set by CORE are ignored for custom
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2434 * regulatory cards. Let us notify the changes to the driver,
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2435 * as some drivers used this to restore its orig_* reg domain.
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2436 */
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2437 if (initiator == NL80211_REGDOM_SET_BY_CORE &&
e31f6456c01c76 Amar Singhal 2018-07-20 2438 wiphy->regulatory_flags & REGULATORY_CUSTOM_REG &&
e31f6456c01c76 Amar Singhal 2018-07-20 2439 !(wiphy->regulatory_flags &
e31f6456c01c76 Amar Singhal 2018-07-20 2440 REGULATORY_WIPHY_SELF_MANAGED))
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2441 reg_call_notifier(wiphy, lr);
a203c2aa4cefcc Sven Neumann 2011-07-12 2442 return;
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2443 }
a203c2aa4cefcc Sven Neumann 2011-07-12 2444
c492db370c17c4 Johannes Berg 2012-12-06 2445 lr->dfs_region = get_cfg80211_regdom()->dfs_region;
b68e6b3b33b208 Luis R. Rodriguez 2011-10-11 2446
57fbcce37be7c1 Johannes Berg 2016-04-12 2447 for (band = 0; band < NUM_NL80211_BANDS; band++)
fdc9d7b2863ce6 Johannes Berg 2012-12-03 2448 handle_band(wiphy, initiator, wiphy->bands[band]);
a203c2aa4cefcc Sven Neumann 2011-07-12 2449
e38f8a7a8bebba Luis R. Rodriguez 2009-02-21 2450 reg_process_beacons(wiphy);
038659e7c6b385 Luis R. Rodriguez 2009-05-02 2451 reg_process_ht_flags(wiphy);
0e3802dbfe53bc Luis R. Rodriguez 2013-11-05 2452 reg_call_notifier(wiphy, lr);
b2e1b30290539b Luis R. Rodriguez 2008-09-09 2453 }
b2e1b30290539b Luis R. Rodriguez 2008-09-09 2454
:::::: The code at line 2425 was first introduced by commit
:::::: eac03e381957a05f3842ceb8de987a1025966ecf cfg80211: hold reg_mutex when updating regulatory
:::::: TO: Sven Neumann <s.neumann(a)raumfeld.com>
:::::: CC: John W. Linville <linville(a)tuxdriver.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months