[peterz-queue:locking/core 41/43] kernel/locking/rwsem.c:1023:19: error: variable has incomplete type 'enum owner_state'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
head: 44e63f63c47dfb202eb25cdd97d04ec7e47f51d8
commit: b08614038dba3f6982e1e7701f23784bb0aedba6 [41/43] locking/rwsem: disable preemption for spinning region
config: hexagon-randconfig-r041-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project acb3b187c4c88650a6a717a1bcb234d27d0d7f54)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/core
git checkout b08614038dba3f6982e1e7701f23784bb0aedba6
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/locking/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> kernel/locking/rwsem.c:1023:19: error: variable has incomplete type 'enum owner_state'
enum owner_state owner_state;
^
kernel/locking/rwsem.c:1023:7: note: forward declaration of 'enum owner_state'
enum owner_state owner_state;
^
1 error generated.
vim +1023 kernel/locking/rwsem.c
1012
1013 /*
1014 * Wait until we successfully acquire the write lock
1015 */
1016 static struct rw_semaphore *
1017 rwsem_down_write_slowpath(struct rw_semaphore *sem, int state)
1018 {
1019 long count;
1020 enum writer_wait_state wstate;
1021 struct rwsem_waiter waiter;
1022 struct rw_semaphore *ret = sem;
> 1023 enum owner_state owner_state;
1024 DEFINE_WAKE_Q(wake_q);
1025
1026 /* do optimistic spinning and steal lock if possible */
1027 if (rwsem_can_spin_on_owner(sem) && rwsem_optimistic_spin(sem)) {
1028 /* rwsem_optimistic_spin() implies ACQUIRE on success */
1029 return sem;
1030 }
1031
1032 /*
1033 * Optimistic spinning failed, proceed to the slowpath
1034 * and block until we can acquire the sem.
1035 */
1036 waiter.task = current;
1037 waiter.type = RWSEM_WAITING_FOR_WRITE;
1038 waiter.timeout = jiffies + RWSEM_WAIT_TIMEOUT;
1039
1040 raw_spin_lock_irq(&sem->wait_lock);
1041
1042 /* account for this before adding a new element to the list */
1043 wstate = list_empty(&sem->wait_list) ? WRITER_FIRST : WRITER_NOT_FIRST;
1044
1045 list_add_tail(&waiter.list, &sem->wait_list);
1046
1047 /* we're now waiting on the lock */
1048 if (wstate == WRITER_NOT_FIRST) {
1049 count = atomic_long_read(&sem->count);
1050
1051 /*
1052 * If there were already threads queued before us and:
1053 * 1) there are no active locks, wake the front
1054 * queued process(es) as the handoff bit might be set.
1055 * 2) there are no active writers and some readers, the lock
1056 * must be read owned; so we try to wake any read lock
1057 * waiters that were queued ahead of us.
1058 */
1059 if (count & RWSEM_WRITER_MASK)
1060 goto wait;
1061
1062 rwsem_mark_wake(sem, (count & RWSEM_READER_MASK)
1063 ? RWSEM_WAKE_READERS
1064 : RWSEM_WAKE_ANY, &wake_q);
1065
1066 if (!wake_q_empty(&wake_q)) {
1067 /*
1068 * We want to minimize wait_lock hold time especially
1069 * when a large number of readers are to be woken up.
1070 */
1071 raw_spin_unlock_irq(&sem->wait_lock);
1072 wake_up_q(&wake_q);
1073 wake_q_init(&wake_q); /* Used again, reinit */
1074 raw_spin_lock_irq(&sem->wait_lock);
1075 }
1076 } else {
1077 atomic_long_or(RWSEM_FLAG_WAITERS, &sem->count);
1078 }
1079
1080 wait:
1081 /* wait until we successfully acquire the lock */
1082 set_current_state(state);
1083 for (;;) {
1084 if (rwsem_try_write_lock(sem, wstate)) {
1085 /* rwsem_try_write_lock() implies ACQUIRE on success */
1086 break;
1087 }
1088
1089 raw_spin_unlock_irq(&sem->wait_lock);
1090
1091 /*
1092 * After setting the handoff bit and failing to acquire
1093 * the lock, attempt to spin on owner to accelerate lock
1094 * transfer. If the previous owner is a on-cpu writer and it
1095 * has just released the lock, OWNER_NULL will be returned.
1096 * In this case, we attempt to acquire the lock again
1097 * without sleeping.
1098 */
1099 if (wstate == WRITER_HANDOFF) {
1100 preempt_disable();
1101 owner_state = rwsem_spin_on_owner(sem);
1102 preempt_enable();
1103 if (owner_state == OWNER_NULL)
1104 goto trylock_again;
1105 }
1106
1107 /* Block until there are no active lockers. */
1108 for (;;) {
1109 if (signal_pending_state(state, current))
1110 goto out_nolock;
1111
1112 schedule();
1113 lockevent_inc(rwsem_sleep_writer);
1114 set_current_state(state);
1115 /*
1116 * If HANDOFF bit is set, unconditionally do
1117 * a trylock.
1118 */
1119 if (wstate == WRITER_HANDOFF)
1120 break;
1121
1122 if ((wstate == WRITER_NOT_FIRST) &&
1123 (rwsem_first_waiter(sem) == &waiter))
1124 wstate = WRITER_FIRST;
1125
1126 count = atomic_long_read(&sem->count);
1127 if (!(count & RWSEM_LOCK_MASK))
1128 break;
1129
1130 /*
1131 * The setting of the handoff bit is deferred
1132 * until rwsem_try_write_lock() is called.
1133 */
1134 if ((wstate == WRITER_FIRST) && (rt_task(current) ||
1135 time_after(jiffies, waiter.timeout))) {
1136 wstate = WRITER_HANDOFF;
1137 lockevent_inc(rwsem_wlock_handoff);
1138 break;
1139 }
1140 }
1141 trylock_again:
1142 raw_spin_lock_irq(&sem->wait_lock);
1143 }
1144 __set_current_state(TASK_RUNNING);
1145 list_del(&waiter.list);
1146 raw_spin_unlock_irq(&sem->wait_lock);
1147 lockevent_inc(rwsem_wlock);
1148
1149 return ret;
1150
1151 out_nolock:
1152 __set_current_state(TASK_RUNNING);
1153 raw_spin_lock_irq(&sem->wait_lock);
1154 list_del(&waiter.list);
1155
1156 if (unlikely(wstate == WRITER_HANDOFF))
1157 atomic_long_add(-RWSEM_FLAG_HANDOFF, &sem->count);
1158
1159 if (list_empty(&sem->wait_list))
1160 atomic_long_andnot(RWSEM_FLAG_WAITERS, &sem->count);
1161 else
1162 rwsem_mark_wake(sem, RWSEM_WAKE_ANY, &wake_q);
1163 raw_spin_unlock_irq(&sem->wait_lock);
1164 wake_up_q(&wake_q);
1165 lockevent_inc(rwsem_wlock_fail);
1166
1167 return ERR_PTR(-EINTR);
1168 }
1169
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH] net: bpf: switch over to memdup_user()
by kernel test robot
Hi Qing,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master net-next/master net/master v5.15-rc6 next-20211015]
[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/Qing-Wang/net-bpf-switch-over-to...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: hexagon-randconfig-r013-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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/0f26c48ef52a60e8ce1ec2eccf6cf0819...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qing-Wang/net-bpf-switch-over-to-memdup_user/20211018-160353
git checkout 0f26c48ef52a60e8ce1ec2eccf6cf0819ee1e8e8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/bpf/test_run.c:170:14: warning: no previous prototype for function 'bpf_fentry_test1' [-Wmissing-prototypes]
int noinline bpf_fentry_test1(int a)
^
net/bpf/test_run.c:170:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test1(int a)
^
static
net/bpf/test_run.c:175:14: warning: no previous prototype for function 'bpf_fentry_test2' [-Wmissing-prototypes]
int noinline bpf_fentry_test2(int a, u64 b)
^
net/bpf/test_run.c:175:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test2(int a, u64 b)
^
static
net/bpf/test_run.c:180:14: warning: no previous prototype for function 'bpf_fentry_test3' [-Wmissing-prototypes]
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
net/bpf/test_run.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
static
net/bpf/test_run.c:185:14: warning: no previous prototype for function 'bpf_fentry_test4' [-Wmissing-prototypes]
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
net/bpf/test_run.c:185:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
static
net/bpf/test_run.c:190:14: warning: no previous prototype for function 'bpf_fentry_test5' [-Wmissing-prototypes]
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
net/bpf/test_run.c:190:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
static
net/bpf/test_run.c:195:14: warning: no previous prototype for function 'bpf_fentry_test6' [-Wmissing-prototypes]
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
net/bpf/test_run.c:195:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
static
net/bpf/test_run.c:204:14: warning: no previous prototype for function 'bpf_fentry_test7' [-Wmissing-prototypes]
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:204:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:209:14: warning: no previous prototype for function 'bpf_fentry_test8' [-Wmissing-prototypes]
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:209:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:214:14: warning: no previous prototype for function 'bpf_modify_return_test' [-Wmissing-prototypes]
int noinline bpf_modify_return_test(int a, int *b)
^
net/bpf/test_run.c:214:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_modify_return_test(int a, int *b)
^
static
net/bpf/test_run.c:220:14: warning: no previous prototype for function 'bpf_kfunc_call_test1' [-Wmissing-prototypes]
u64 noinline bpf_kfunc_call_test1(struct sock *sk, u32 a, u64 b, u32 c, u64 d)
^
net/bpf/test_run.c:220:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u64 noinline bpf_kfunc_call_test1(struct sock *sk, u32 a, u64 b, u32 c, u64 d)
^
static
net/bpf/test_run.c:225:14: warning: no previous prototype for function 'bpf_kfunc_call_test2' [-Wmissing-prototypes]
int noinline bpf_kfunc_call_test2(struct sock *sk, u32 a, u32 b)
^
net/bpf/test_run.c:225:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_kfunc_call_test2(struct sock *sk, u32 a, u32 b)
^
static
net/bpf/test_run.c:230:24: warning: no previous prototype for function 'bpf_kfunc_call_test3' [-Wmissing-prototypes]
struct sock * noinline bpf_kfunc_call_test3(struct sock *sk)
^
net/bpf/test_run.c:230:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct sock * noinline bpf_kfunc_call_test3(struct sock *sk)
^
static
>> net/bpf/test_run.c:363:11: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return ERR_PTR(PTR_ERR(info.ctx));
^~~~~~~~~~~~~~~~~~~~~~~~~~
net/bpf/test_run.c:1052:11: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return ERR_PTR(PTR_ERR(ctx));
^~~~~~~~~~~~~~~~~~~~~
14 warnings generated.
vim +363 net/bpf/test_run.c
336
337 int bpf_prog_test_run_raw_tp(struct bpf_prog *prog,
338 const union bpf_attr *kattr,
339 union bpf_attr __user *uattr)
340 {
341 void __user *ctx_in = u64_to_user_ptr(kattr->test.ctx_in);
342 __u32 ctx_size_in = kattr->test.ctx_size_in;
343 struct bpf_raw_tp_test_run_info info;
344 int cpu = kattr->test.cpu, err = 0;
345 int current_cpu;
346
347 /* doesn't support data_in/out, ctx_out, duration, or repeat */
348 if (kattr->test.data_in || kattr->test.data_out ||
349 kattr->test.ctx_out || kattr->test.duration ||
350 kattr->test.repeat)
351 return -EINVAL;
352
353 if (ctx_size_in < prog->aux->max_ctx_offset ||
354 ctx_size_in > MAX_BPF_FUNC_ARGS * sizeof(u64))
355 return -EINVAL;
356
357 if ((kattr->test.flags & BPF_F_TEST_RUN_ON_CPU) == 0 && cpu != 0)
358 return -EINVAL;
359
360 if (ctx_size_in) {
361 info.ctx = memdup_user(ctx_in, ctx_size_in);
362 if (IS_ERR(info.ctx))
> 363 return ERR_PTR(PTR_ERR(info.ctx));
364 } else {
365 info.ctx = NULL;
366 }
367
368 info.prog = prog;
369
370 current_cpu = get_cpu();
371 if ((kattr->test.flags & BPF_F_TEST_RUN_ON_CPU) == 0 ||
372 cpu == current_cpu) {
373 __bpf_prog_test_run_raw_tp(&info);
374 } else if (cpu >= nr_cpu_ids || !cpu_online(cpu)) {
375 /* smp_call_function_single() also checks cpu_online()
376 * after csd_lock(). However, since cpu is from user
377 * space, let's do an extra quick check to filter out
378 * invalid value before smp_call_function_single().
379 */
380 err = -ENXIO;
381 } else {
382 err = smp_call_function_single(cpu, __bpf_prog_test_run_raw_tp,
383 &info, 1);
384 }
385 put_cpu();
386
387 if (!err &&
388 copy_to_user(&uattr->test.retval, &info.retval, sizeof(u32)))
389 err = -EFAULT;
390
391 kfree(info.ctx);
392 return err;
393 }
394
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[sashal-stable:pending-5.14 46/120] drivers/firmware/arm_ffa/bus.c:96:13: error: incompatible function pointer types initializing 'int (*)(struct device *)' with an expression of type 'void (struct device *)'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.14
head: 59866f9b89f5e40470ac87841bce5bf6eacdfdf6
commit: 5f907f2abe30e022918ddea8d07ead241765d3d8 [46/120] firmware: arm_ffa: Add missing remove callback to ffa_bus_type
config: arm64-randconfig-r024-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-stable pending-5.14
git checkout 5f907f2abe30e022918ddea8d07ead241765d3d8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/firmware/arm_ffa/bus.c:96:13: error: incompatible function pointer types initializing 'int (*)(struct device *)' with an expression of type 'void (struct device *)' [-Werror,-Wincompatible-function-pointer-types]
.remove = ffa_device_remove,
^~~~~~~~~~~~~~~~~
1 error generated.
vim +96 drivers/firmware/arm_ffa/bus.c
91
92 struct bus_type ffa_bus_type = {
93 .name = "arm_ffa",
94 .match = ffa_device_match,
95 .probe = ffa_device_probe,
> 96 .remove = ffa_device_remove,
97 .uevent = ffa_device_uevent,
98 .dev_groups = ffa_device_attributes_groups,
99 };
100 EXPORT_SYMBOL_GPL(ffa_bus_type);
101
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[intel-lts:5.10/preempt-rt 12539/17820] drivers/video/fbdev/core/fbmem.c:736:21: warning: attribute declaration must precede definition
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 92cafac7cc9c1af94b9b5b61e35fbbd39d4f5854
commit: 3aeb5198342e78c3f2ed6bc9431e492a4550cd2a [12539/17820] fbmem: Mark proc_fb_seq_ops as __maybe_unused
config: riscv-randconfig-r042-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/3aeb5198342e78c3f2ed6bc94...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/preempt-rt
git checkout 3aeb5198342e78c3f2ed6bc9431e492a4550cd2a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/video/fbdev/core/fbmem.c:736:21: warning: attribute declaration must precede definition [-Wignored-attributes]
static const struct __maybe_unused seq_operations proc_fb_seq_ops = {
^
include/linux/compiler_attributes.h:267:56: note: expanded from macro '__maybe_unused'
#define __maybe_unused __attribute__((__unused__))
^
include/linux/seq_file.h:31:8: note: previous definition is here
struct seq_operations {
^
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +736 drivers/video/fbdev/core/fbmem.c
735
> 736 static const struct __maybe_unused seq_operations proc_fb_seq_ops = {
737 .start = fb_seq_start,
738 .next = fb_seq_next,
739 .stop = fb_seq_stop,
740 .show = fb_seq_show,
741 };
742
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[intel-lts:5.10/preempt-rt 10959/17820] drivers/media/v4l2-core/v4l2-subdev.c:908:5: warning: stack frame size (1424) exceeds limit (1024) in 'v4l2_subdev_link_validate'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 92cafac7cc9c1af94b9b5b61e35fbbd39d4f5854
commit: f13978177f8c57c155d53df5f2df60f519e82e4a [10959/17820] v4l: subdev: Add support for sub-streams
config: riscv-randconfig-r042-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/f13978177f8c57c155d53df5f...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/preempt-rt
git checkout f13978177f8c57c155d53df5f2df60f519e82e4a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/v4l2-core/v4l2-subdev.c:908:5: warning: stack frame size (1424) exceeds limit (1024) in 'v4l2_subdev_link_validate' [-Wframe-larger-than]
int v4l2_subdev_link_validate(struct media_link *link)
^
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +/v4l2_subdev_link_validate +908 drivers/media/v4l2-core/v4l2-subdev.c
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 907
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 @908 int v4l2_subdev_link_validate(struct media_link *link)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 909 {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 910 struct v4l2_subdev *sink;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 911 struct v4l2_subdev_route sink_routes[LINK_VALIDATE_ROUTES];
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 912 struct v4l2_subdev_routing sink_routing = {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 913 .routes = sink_routes,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 914 .num_routes = ARRAY_SIZE(sink_routes),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 915 };
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 916 struct v4l2_subdev_route src_routes[LINK_VALIDATE_ROUTES];
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 917 struct v4l2_subdev_routing src_routing = {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 918 .routes = src_routes,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 919 .num_routes = ARRAY_SIZE(src_routes),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 920 };
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 921 unsigned int i, j;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 922 int rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 923
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 924 sink = media_entity_to_v4l2_subdev(link->sink->entity);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 925 if (!sink)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 926 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 927
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 928 if (!(link->sink->flags & MEDIA_PAD_FL_MULTIPLEX &&
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 929 link->source->flags & MEDIA_PAD_FL_MULTIPLEX))
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 930 return v4l2_subdev_link_validate_one(link, link->source, 0,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 931 link->sink, 0);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 932 /*
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 933 * multiplex link cannot proceed without route information.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 934 */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 935 rval = v4l2_subdev_call(sink, pad, get_routing, &sink_routing);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 936 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 937 dev_err(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 938 "error %d in get_routing() on %s, sink pad %u\n", rval,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 939 sink->entity.name, link->sink->index);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 940
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 941 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 942 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 943
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 944 rval = v4l2_subdev_call(media_entity_to_v4l2_subdev(
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 945 link->source->entity),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 946 pad, get_routing, &src_routing);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 947 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 948 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 949 "error %d in get_routing() on %s, source pad %u\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 950 rval, sink->entity.name, link->source->index);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 951
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 952 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 953 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 954
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 955 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 956 "validating multiplexed link \"%s\":%u -> \"%s\":%u; %u/%u routes\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 957 link->source->entity->name, link->source->index,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 958 sink->entity.name, link->sink->index,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 959 src_routing.num_routes, sink_routing.num_routes);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 960
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 961 for (i = 0; i < sink_routing.num_routes; i++) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 962 /* Get the first active route for the sink pad. */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 963 if (sink_routes[i].sink_pad != link->sink->index ||
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 964 !(sink_routes[i].flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 965 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 966 "skipping sink route %u/%u -> %u/%u[%u]\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 967 sink_routes[i].sink_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 968 sink_routes[i].sink_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 969 sink_routes[i].source_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 970 sink_routes[i].source_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 971 (bool)(sink_routes[i].flags
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 972 & V4L2_SUBDEV_ROUTE_FL_ACTIVE));
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 973 continue;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 974 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 975
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 976 /*
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 977 * Get the corresponding route for the source pad.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 978 * It's ok for the source pad to have routes active
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 979 * where the sink pad does not, but the routes that
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 980 * are active on the source pad have to be active on
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 981 * the sink pad as well.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 982 */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 983
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 984 for (j = 0; j < src_routing.num_routes; j++) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 985 if (src_routes[j].source_pad == link->source->index &&
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 986 src_routes[j].source_stream
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 987 == sink_routes[i].sink_stream)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 988 break;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 989 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 990
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 991 if (j == src_routing.num_routes) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 992 dev_err(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 993 "no corresponding source found.\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 994 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 995 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 996
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 997 /* The source route must be active. */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 998 if (!(src_routes[j].flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 999 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1000 "source route not active\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1001 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1002 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1003
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1004 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1005 "validating link \"%s\": %u/%u => \"%s\" %u/%u\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1006 link->source->entity->name, src_routes[j].source_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1007 src_routes[j].source_stream, sink->entity.name,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1008 sink_routes[i].sink_pad, sink_routes[i].sink_stream);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1009
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1010 rval = v4l2_subdev_link_validate_one(
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1011 link, link->source, src_routes[j].source_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1012 link->sink, sink_routes[i].sink_stream);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1013 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1014 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1015 "error %d in link validation\n", rval);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1016 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1017 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1018 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1019
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1020 if (i < sink_routing.num_routes) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1021 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1022 "not all sink routes verified; out of source routes\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1023 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1024 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1025
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1026 return 0;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1027 }
8227c92b696884 drivers/media/video/v4l2-subdev.c Sakari Ailus 2011-10-10 1028 EXPORT_SYMBOL_GPL(v4l2_subdev_link_validate);
9b02cbb3ede89b drivers/media/v4l2-core/v4l2-subdev.c Laurent Pinchart 2015-04-24 1029
:::::: The code at line 908 was first introduced by commit
:::::: e822d33e27dd00bb200f0e9db1811231554ce03c v4l: Take routing info into account in link validation
:::::: TO: wu xia <xia.wu(a)intel.com>
:::::: CC: Pan, Kris <kris.pan(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH 6/8] phy: uniphier-pcie: Add dual-phy support for NX1 SoC
by kernel test robot
Hi Kunihiko,
I love your patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v5.15-rc5 next-20211015]
[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/Kunihiko-Hayashi/phy-socionext-I...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: riscv-randconfig-r042-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/a3f73681b86f6da2c6617b1f3baf5d046...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kunihiko-Hayashi/phy-socionext-Introduce-some-features-for-UniPhier-SoCs/20211018-093816
git checkout a3f73681b86f6da2c6617b1f3baf5d046582d33d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/phy/socionext/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/phy/socionext/phy-uniphier-pcie.c:181:48: error: too few arguments to function call, expected 5, have 4
FIELD_PREP(VCOPLL_CLMP, VCOPLL_CLMP_VAL));
^
drivers/phy/socionext/phy-uniphier-pcie.c:95:13: note: 'uniphier_pciephy_set_param' declared here
static void uniphier_pciephy_set_param(struct uniphier_pciephy_priv *priv,
^
1 error generated.
vim +181 drivers/phy/socionext/phy-uniphier-pcie.c
c6d9b132415951 Kunihiko Hayashi 2018-09-05 140
c6d9b132415951 Kunihiko Hayashi 2018-09-05 141 static int uniphier_pciephy_init(struct phy *phy)
c6d9b132415951 Kunihiko Hayashi 2018-09-05 142 {
c6d9b132415951 Kunihiko Hayashi 2018-09-05 143 struct uniphier_pciephy_priv *priv = phy_get_drvdata(phy);
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 144 u32 val;
a3f73681b86f6d Kunihiko Hayashi 2021-10-18 145 int ret, id;
c6d9b132415951 Kunihiko Hayashi 2018-09-05 146
c6d9b132415951 Kunihiko Hayashi 2018-09-05 147 ret = clk_prepare_enable(priv->clk);
c6d9b132415951 Kunihiko Hayashi 2018-09-05 148 if (ret)
c6d9b132415951 Kunihiko Hayashi 2018-09-05 149 return ret;
c6d9b132415951 Kunihiko Hayashi 2018-09-05 150
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 151 ret = clk_prepare_enable(priv->clk_gio);
c6d9b132415951 Kunihiko Hayashi 2018-09-05 152 if (ret)
c6d9b132415951 Kunihiko Hayashi 2018-09-05 153 goto out_clk_disable;
c6d9b132415951 Kunihiko Hayashi 2018-09-05 154
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 155 ret = reset_control_deassert(priv->rst);
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 156 if (ret)
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 157 goto out_clk_gio_disable;
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 158
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 159 ret = reset_control_deassert(priv->rst_gio);
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 160 if (ret)
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 161 goto out_rst_assert;
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 162
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 163 /* support only 1 port */
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 164 val = readl(priv->base + PCL_PHY_CLKCTRL);
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 165 val &= ~PORT_SEL_MASK;
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 166 val |= PORT_SEL_1;
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 167 writel(val, priv->base + PCL_PHY_CLKCTRL);
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 168
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 169 /* legacy controller doesn't have phy_reset and parameters */
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 170 if (priv->data->is_legacy)
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 171 return 0;
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 172
a3f73681b86f6d Kunihiko Hayashi 2021-10-18 173 for (id = 0; id < (priv->data->is_dual_phy ? 2 : 1); id++) {
a3f73681b86f6d Kunihiko Hayashi 2021-10-18 174 uniphier_pciephy_set_param(priv, id, PCL_PHY_R00,
c6d9b132415951 Kunihiko Hayashi 2018-09-05 175 RX_EQ_ADJ_EN, RX_EQ_ADJ_EN);
a3f73681b86f6d Kunihiko Hayashi 2021-10-18 176 uniphier_pciephy_set_param(priv, id, PCL_PHY_R06, RX_EQ_ADJ,
c6d9b132415951 Kunihiko Hayashi 2018-09-05 177 FIELD_PREP(RX_EQ_ADJ, RX_EQ_ADJ_VAL));
a3f73681b86f6d Kunihiko Hayashi 2021-10-18 178 uniphier_pciephy_set_param(priv, id, PCL_PHY_R26, VCO_CTRL,
c6d9b132415951 Kunihiko Hayashi 2018-09-05 179 FIELD_PREP(VCO_CTRL, VCO_CTRL_INIT_VAL));
27db30df224a79 Kunihiko Hayashi 2021-10-18 180 uniphier_pciephy_set_param(priv, PCL_PHY_R28, VCOPLL_CLMP,
27db30df224a79 Kunihiko Hayashi 2021-10-18 @181 FIELD_PREP(VCOPLL_CLMP, VCOPLL_CLMP_VAL));
a3f73681b86f6d Kunihiko Hayashi 2021-10-18 182 }
c6d9b132415951 Kunihiko Hayashi 2018-09-05 183 usleep_range(1, 10);
c6d9b132415951 Kunihiko Hayashi 2018-09-05 184
c6d9b132415951 Kunihiko Hayashi 2018-09-05 185 uniphier_pciephy_deassert(priv);
c6d9b132415951 Kunihiko Hayashi 2018-09-05 186 usleep_range(1, 10);
c6d9b132415951 Kunihiko Hayashi 2018-09-05 187
c6d9b132415951 Kunihiko Hayashi 2018-09-05 188 return 0;
c6d9b132415951 Kunihiko Hayashi 2018-09-05 189
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 190 out_rst_assert:
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 191 reset_control_assert(priv->rst);
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 192 out_clk_gio_disable:
04de8fa202e6d5 Kunihiko Hayashi 2020-01-30 193 clk_disable_unprepare(priv->clk_gio);
c6d9b132415951 Kunihiko Hayashi 2018-09-05 194 out_clk_disable:
c6d9b132415951 Kunihiko Hayashi 2018-09-05 195 clk_disable_unprepare(priv->clk);
c6d9b132415951 Kunihiko Hayashi 2018-09-05 196
c6d9b132415951 Kunihiko Hayashi 2018-09-05 197 return ret;
c6d9b132415951 Kunihiko Hayashi 2018-09-05 198 }
c6d9b132415951 Kunihiko Hayashi 2018-09-05 199
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
drivers/media/i2c/ov5648.c:2035:39: warning: taking address of packed member 'handler' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d999ade1cc86cd2951d41c11ea769cb4452c8811
commit: e43ccb0a045f34838b786e8021dc4838b4af5c38 media: i2c: Add support for the OV5648 image sensor
date: 9 months ago
config: mips-buildonly-randconfig-r004-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/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 e43ccb0a045f34838b786e8021dc4838b4af5c38
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/ov5648.c:2035:39: warning: taking address of packed member 'handler' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value [-Waddress-of-packed-member]
struct v4l2_ctrl_handler *handler = &ctrls->handler;
^~~~~~~~~~~~~~
>> drivers/media/i2c/ov5648.c:2054:29: warning: taking address of packed member 'exposure_auto' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value [-Waddress-of-packed-member]
v4l2_ctrl_auto_cluster(2, &ctrls->exposure_auto, 1, true);
^~~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/ov5648.c:2064:29: warning: taking address of packed member 'gain_auto' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value [-Waddress-of-packed-member]
v4l2_ctrl_auto_cluster(2, &ctrls->gain_auto, 0, true);
^~~~~~~~~~~~~~~~
>> drivers/media/i2c/ov5648.c:2080:29: warning: taking address of packed member 'white_balance_auto' of class or structure 'ov5648_ctrls' may result in an unaligned pointer value [-Waddress-of-packed-member]
v4l2_ctrl_auto_cluster(3, &ctrls->white_balance_auto, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
vim +2035 drivers/media/i2c/ov5648.c
2031
2032 static int ov5648_ctrls_init(struct ov5648_sensor *sensor)
2033 {
2034 struct ov5648_ctrls *ctrls = &sensor->ctrls;
> 2035 struct v4l2_ctrl_handler *handler = &ctrls->handler;
2036 const struct v4l2_ctrl_ops *ops = &ov5648_ctrl_ops;
2037 int ret;
2038
2039 v4l2_ctrl_handler_init(handler, 32);
2040
2041 /* Use our mutex for ctrl locking. */
2042 handler->lock = &sensor->mutex;
2043
2044 /* Exposure */
2045
2046 ctrls->exposure_auto = v4l2_ctrl_new_std_menu(handler, ops,
2047 V4L2_CID_EXPOSURE_AUTO,
2048 V4L2_EXPOSURE_MANUAL, 0,
2049 V4L2_EXPOSURE_AUTO);
2050
2051 ctrls->exposure = v4l2_ctrl_new_std(handler, ops, V4L2_CID_EXPOSURE,
2052 16, 1048575, 16, 512);
2053
> 2054 v4l2_ctrl_auto_cluster(2, &ctrls->exposure_auto, 1, true);
2055
2056 /* Gain */
2057
2058 ctrls->gain_auto =
2059 v4l2_ctrl_new_std(handler, ops, V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
2060
2061 ctrls->gain = v4l2_ctrl_new_std(handler, ops, V4L2_CID_GAIN, 16, 1023,
2062 16, 16);
2063
> 2064 v4l2_ctrl_auto_cluster(2, &ctrls->gain_auto, 0, true);
2065
2066 /* White Balance */
2067
2068 ctrls->white_balance_auto =
2069 v4l2_ctrl_new_std(handler, ops, V4L2_CID_AUTO_WHITE_BALANCE, 0,
2070 1, 1, 1);
2071
2072 ctrls->red_balance = v4l2_ctrl_new_std(handler, ops,
2073 V4L2_CID_RED_BALANCE, 0, 4095,
2074 1, 1024);
2075
2076 ctrls->blue_balance = v4l2_ctrl_new_std(handler, ops,
2077 V4L2_CID_BLUE_BALANCE, 0, 4095,
2078 1, 1024);
2079
> 2080 v4l2_ctrl_auto_cluster(3, &ctrls->white_balance_auto, 0, false);
2081
2082 /* Flip */
2083
2084 v4l2_ctrl_new_std(handler, ops, V4L2_CID_HFLIP, 0, 1, 1, 0);
2085 v4l2_ctrl_new_std(handler, ops, V4L2_CID_VFLIP, 0, 1, 1, 0);
2086
2087 /* Test Pattern */
2088
2089 v4l2_ctrl_new_std_menu_items(handler, ops, V4L2_CID_TEST_PATTERN,
2090 ARRAY_SIZE(ov5648_test_pattern_menu) - 1,
2091 0, 0, ov5648_test_pattern_menu);
2092
2093 /* MIPI CSI-2 */
2094
2095 ctrls->link_freq =
2096 v4l2_ctrl_new_int_menu(handler, NULL, V4L2_CID_LINK_FREQ,
2097 ARRAY_SIZE(ov5648_link_freq_menu) - 1,
2098 0, ov5648_link_freq_menu);
2099
2100 ctrls->pixel_rate =
2101 v4l2_ctrl_new_std(handler, NULL, V4L2_CID_PIXEL_RATE, 1,
2102 INT_MAX, 1, 1);
2103
2104 if (handler->error) {
2105 ret = handler->error;
2106 goto error_ctrls;
2107 }
2108
2109 ctrls->exposure->flags |= V4L2_CTRL_FLAG_VOLATILE;
2110 ctrls->gain->flags |= V4L2_CTRL_FLAG_VOLATILE;
2111
2112 ctrls->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
2113 ctrls->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
2114
2115 sensor->subdev.ctrl_handler = handler;
2116
2117 return 0;
2118
2119 error_ctrls:
2120 v4l2_ctrl_handler_free(handler);
2121
2122 return ret;
2123 }
2124
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week