[android-common:android12-5.10 6063/13830] include/trace/hooks/cpufreq.h:23:1: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 2d6a43c0364d3bb0c5c00b0a32b27f4c7740e004
commit: 2d45001d598b26a50c8da39814b61f56c42ef608 [6063/13830] ANDROID: cpufreq: Add a restricted vendor hook for freq transition
config: x86_64-randconfig-s021-20211207 (https://download.01.org/0day-ci/archive/20211212/202112120524.yvVvr6Dz-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 2d45001d598b26a50c8da39814b61f56c42ef608
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/android/ drivers/media/mc/ drivers/media/v4l2-core/ drivers/pci/ kernel/ net/core/ net/ipv4/
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 >>)
include/trace/hooks/sched.h:112:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:112:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:112:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:121:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:121:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:121:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:126:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:126:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:126:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:130:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:130:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:130:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:134:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:134:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:134:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:138:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:138:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:138:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:143:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:143:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:143:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:147:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:147:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:147:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:151:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:151:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:151:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:155:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:155:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:155:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:159:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:159:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:159:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:163:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:163:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:163:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:167:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:167:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:167:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:171:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:171:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:171:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:175:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:175:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:175:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:179:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:179:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:179:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:183:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:183:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:183:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:187:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:187:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:187:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:192:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:192:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:192:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:196:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:196:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:196:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:200:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:200:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:200:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:204:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:204:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:204:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:209:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:209:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:209:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:213:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:213:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:213:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:217:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:217:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:217:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:221:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:221:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:221:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:225:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:225:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:225:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:229:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:229:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:229:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:245:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:245:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:245:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:249:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:249:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:249:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:254:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:254:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:254:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:259:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:259:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:259:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:273:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:273:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:273:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/cpufreq.h):
>> include/trace/hooks/cpufreq.h:23:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/cpufreq.h:23:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/cpufreq.h:23:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/mm.h):
include/trace/hooks/mm.h:16:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:16:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:16:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/mm.h:19:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:19:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:19:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/mm.h:22:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:22:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:22:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/preemptirq.h):
include/trace/hooks/preemptirq.h:14:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:14:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:14:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:18:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:18:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:18:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:22:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:22:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:22:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:26:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:26:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:26:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/bug.h):
include/trace/hooks/bug.h:14:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/bug.h:14:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/bug.h:14:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/fault.h):
include/trace/hooks/fault.h:15:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:15:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:15:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:19:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:19:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:19:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:23:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:23:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:23:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:27:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:27:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:27:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
vim +23 include/trace/hooks/cpufreq.h
13
14 DECLARE_HOOK(android_vh_show_max_freq,
15 TP_PROTO(struct cpufreq_policy *policy, unsigned int *max_freq),
16 TP_ARGS(policy, max_freq));
17
18 DECLARE_HOOK(android_vh_freq_table_limits,
19 TP_PROTO(struct cpufreq_policy *policy, unsigned int min_freq,
20 unsigned int max_freq),
21 TP_ARGS(policy, min_freq, max_freq));
22
> 23 DECLARE_RESTRICTED_HOOK(android_rvh_cpufreq_transition,
24 TP_PROTO(struct cpufreq_policy *policy),
25 TP_ARGS(policy), 1);
26 /* macro versions of hooks are no longer required */
27
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[android-common:android12-5.10 4429/13830] include/trace/hooks/fault.h:15:1: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 2d6a43c0364d3bb0c5c00b0a32b27f4c7740e004
commit: a8313dbdb3ababea980fdc4a8144349bcfdd04d8 [4429/13830] ANDROID: arm64: add vendor hooks for kernel fault cases
config: x86_64-randconfig-s021-20211207 (https://download.01.org/0day-ci/archive/20211212/202112120335.XOkoIrq3-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout a8313dbdb3ababea980fdc4a8144349bcfdd04d8
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/android/ drivers/media/mc/ drivers/media/v4l2-core/ drivers/pci/ kernel/ net/core/ net/ipv4/
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 >>)
include/trace/hooks/sched.h:135:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:135:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:135:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:139:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:139:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:139:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:143:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:143:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:143:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:147:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:147:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:147:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:151:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:151:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:151:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:155:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:155:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:155:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:159:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:159:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:159:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:163:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:163:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:163:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:167:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:167:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:167:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:171:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:171:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:171:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:175:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:175:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:175:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:179:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:179:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:179:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:184:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:184:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:184:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:188:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:188:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:188:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:192:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:192:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:192:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:196:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:196:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:196:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:201:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:201:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:201:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:205:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:205:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:205:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:209:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:209:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:209:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:213:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:213:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:213:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:217:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:217:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:217:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:221:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:221:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:221:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:237:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:237:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:237:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:241:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:241:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:241:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/mm.h):
include/trace/hooks/mm.h:15:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:15:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:15:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/mm.h:18:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:18:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:18:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/mm.h:21:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:21:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:21:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/preemptirq.h):
include/trace/hooks/preemptirq.h:14:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:14:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:14:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:18:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:18:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:18:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:22:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:22:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:22:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:26:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:26:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:26:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/bug.h):
include/trace/hooks/bug.h:14:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/bug.h:14:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/bug.h:14:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/fault.h):
>> include/trace/hooks/fault.h:15:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:15:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:15:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:19:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:19:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:19:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:23:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:23:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:23:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:27:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:27:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:27:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
vim +15 include/trace/hooks/fault.h
5
6 #if !defined(_TRACE_HOOK_FAULT_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_HOOK_FAULT_H
8 #include <linux/tracepoint.h>
9 #include <trace/hooks/vendor_hooks.h>
10 /*
11 * Following tracepoints are not exported in tracefs and provide a
12 * mechanism for vendor modules to hook and extend functionality
13 */
14 struct pt_regs;
> 15 DECLARE_RESTRICTED_HOOK(android_rvh_die_kernel_fault,
16 TP_PROTO(struct pt_regs *regs, unsigned int esr, unsigned long addr, const char *msg),
17 TP_ARGS(regs, esr, addr, msg), 1);
18
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[chao:dev 2/5] fs/f2fs/xattr.c:691:20: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git dev
head: 0f9e12d0df416311a310873984101b0b6b4ab054
commit: 0514b392fdbe2e6681e4fb513ce78b2d05d51496 [2/5] f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr()
config: i386-buildonly-randconfig-r003-20211211 (https://download.01.org/0day-ci/archive/20211212/202112120347.GGgB0mVe-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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/chao/linux.git/commit/?id...
git remote add chao https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
git fetch --no-tags chao dev
git checkout 0514b392fdbe2e6681e4fb513ce78b2d05d51496
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/f2fs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/f2fs/xattr.c:691:20: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
inode->i_ino, ENTRY_SIZE(last));
^~~~~~~~~~~~~~~~
fs/f2fs/f2fs.h:2247:35: note: expanded from macro 'f2fs_err'
f2fs_printk(sbi, KERN_ERR fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
fs/f2fs/xattr.h:62:27: note: expanded from macro 'ENTRY_SIZE'
#define ENTRY_SIZE(entry) (XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +691 fs/f2fs/xattr.c
629
630 static int __f2fs_setxattr(struct inode *inode, int index,
631 const char *name, const void *value, size_t size,
632 struct page *ipage, int flags)
633 {
634 struct f2fs_xattr_entry *here, *last;
635 void *base_addr, *last_base_addr;
636 int found, newsize;
637 size_t len;
638 __u32 new_hsize;
639 int error;
640
641 if (name == NULL)
642 return -EINVAL;
643
644 if (value == NULL)
645 size = 0;
646
647 len = strlen(name);
648
649 if (len > F2FS_NAME_LEN)
650 return -ERANGE;
651
652 if (size > MAX_VALUE_LEN(inode))
653 return -E2BIG;
654
655 error = read_all_xattrs(inode, ipage, &base_addr);
656 if (error)
657 return error;
658
659 last_base_addr = (void *)base_addr + XATTR_SIZE(inode);
660
661 /* find entry with wanted name. */
662 here = __find_xattr(base_addr, last_base_addr, index, len, name);
663 if (!here) {
664 f2fs_err(F2FS_I_SB(inode), "inode (%lu) has corrupted xattr",
665 inode->i_ino);
666 set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
667 error = -EFSCORRUPTED;
668 goto exit;
669 }
670
671 found = IS_XATTR_LAST_ENTRY(here) ? 0 : 1;
672
673 if (found) {
674 if ((flags & XATTR_CREATE)) {
675 error = -EEXIST;
676 goto exit;
677 }
678
679 if (value && f2fs_xattr_value_same(here, value, size))
680 goto same;
681 } else if ((flags & XATTR_REPLACE)) {
682 error = -ENODATA;
683 goto exit;
684 }
685
686 last = here;
687 while (!IS_XATTR_LAST_ENTRY(last)) {
688 if ((void *)(last) + sizeof(__u32) > last_base_addr ||
689 (void *)XATTR_NEXT_ENTRY(last) > last_base_addr) {
690 f2fs_err(F2FS_I_SB(inode), "inode (%lu) has invalid last xattr entry, entry_size: %lu",
> 691 inode->i_ino, ENTRY_SIZE(last));
692 set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
693 error = -EFSCORRUPTED;
694 goto exit;
695 }
696 last = XATTR_NEXT_ENTRY(last);
697 }
698
699 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + len + size);
700
701 /* 1. Check space */
702 if (value) {
703 int free;
704 /*
705 * If value is NULL, it is remove operation.
706 * In case of update operation, we calculate free.
707 */
708 free = MIN_OFFSET(inode) - ((char *)last - (char *)base_addr);
709 if (found)
710 free = free + ENTRY_SIZE(here);
711
712 if (unlikely(free < newsize)) {
713 error = -E2BIG;
714 goto exit;
715 }
716 }
717
718 /* 2. Remove old entry */
719 if (found) {
720 /*
721 * If entry is found, remove old entry.
722 * If not found, remove operation is not needed.
723 */
724 struct f2fs_xattr_entry *next = XATTR_NEXT_ENTRY(here);
725 int oldsize = ENTRY_SIZE(here);
726
727 memmove(here, next, (char *)last - (char *)next);
728 last = (struct f2fs_xattr_entry *)((char *)last - oldsize);
729 memset(last, 0, oldsize);
730 }
731
732 new_hsize = (char *)last - (char *)base_addr;
733
734 /* 3. Write new entry */
735 if (value) {
736 char *pval;
737 /*
738 * Before we come here, old entry is removed.
739 * We just write new entry.
740 */
741 last->e_name_index = index;
742 last->e_name_len = len;
743 memcpy(last->e_name, name, len);
744 pval = last->e_name + len;
745 memcpy(pval, value, size);
746 last->e_value_size = cpu_to_le16(size);
747 new_hsize += newsize;
748 }
749
750 error = write_all_xattrs(inode, new_hsize, base_addr, ipage);
751 if (error)
752 goto exit;
753
754 if (index == F2FS_XATTR_INDEX_ENCRYPTION &&
755 !strcmp(name, F2FS_XATTR_NAME_ENCRYPTION_CONTEXT))
756 f2fs_set_encrypted_inode(inode);
757 f2fs_mark_inode_dirty_sync(inode, true);
758 if (!error && S_ISDIR(inode->i_mode))
759 set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_CP);
760
761 same:
762 if (is_inode_flag_set(inode, FI_ACL_MODE)) {
763 inode->i_mode = F2FS_I(inode)->i_acl_mode;
764 inode->i_ctime = current_time(inode);
765 clear_inode_flag(inode, FI_ACL_MODE);
766 }
767
768 exit:
769 kfree(base_addr);
770 return error;
771 }
772
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[chanwoo:devfreq-testing 2/4] arch/um/include/asm/processor-generic.h:104:19: error: expected identifier or '(' before '&' token
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing
head: 5857e3d1820d85e10321ec180ed88e780fd0ec3e
commit: d678890dcdf858c25d2789793a35a81c4311e972 [2/4] PM / devfreq: Add cpu based scaling support to passive governor
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20211212/202112120322.6KDmAB1p-lk...)
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/chanwoo/linux.git/commit/...
git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing
git checkout d678890dcdf858c25d2789793a35a81c4311e972
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/rcupdate.h:30,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from drivers/base/power/main.c:21:
>> arch/um/include/asm/processor-generic.h:104:19: error: expected identifier or '(' before '&' token
104 | #define cpu_data (&boot_cpu_data)
| ^
include/linux/devfreq.h:331:27: note: in expansion of macro 'cpu_data'
331 | struct devfreq_cpu_data *cpu_data[NR_CPUS];
| ^~~~~~~~
In file included from drivers/base/power/main.c:35:
include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
332 | };
| ^
--
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:95,
from include/linux/mm_types.h:9,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from drivers/devfreq/governor_passive.c:10:
>> arch/um/include/asm/processor-generic.h:104:19: error: expected identifier or '(' before '&' token
104 | #define cpu_data (&boot_cpu_data)
| ^
include/linux/devfreq.h:331:27: note: in expansion of macro 'cpu_data'
331 | struct devfreq_cpu_data *cpu_data[NR_CPUS];
| ^~~~~~~~
In file included from drivers/devfreq/governor_passive.c:16:
include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
332 | };
| ^
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:95,
from include/linux/mm_types.h:9,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from drivers/devfreq/governor_passive.c:10:
drivers/devfreq/governor_passive.c: In function 'get_target_freq_with_cpufreq':
>> arch/um/include/asm/processor-generic.h:104:18: error: expected identifier before '(' token
104 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:58:29: note: in expansion of macro 'cpu_data'
58 | parent_cpu_data = p_data->cpu_data[cpu];
| ^~~~~~~~
drivers/devfreq/governor_passive.c:50:31: warning: variable 'p_data' set but not used [-Wunused-but-set-variable]
50 | struct devfreq_passive_data *p_data =
| ^~~~~~
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:95,
from include/linux/mm_types.h:9,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from drivers/devfreq/governor_passive.c:10:
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_notifier_call':
>> arch/um/include/asm/processor-generic.h:104:18: error: expected identifier before '(' token
104 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:221:10: note: in expansion of macro 'cpu_data'
221 | !data->cpu_data[freqs->policy->cpu])
| ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:104:18: error: expected identifier before '(' token
104 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:224:26: note: in expansion of macro 'cpu_data'
224 | parent_cpu_data = data->cpu_data[freqs->policy->cpu];
| ^~~~~~~~
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_unregister_notifier':
>> arch/um/include/asm/processor-generic.h:104:18: error: expected identifier before '(' token
104 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:258:29: note: in expansion of macro 'cpu_data'
258 | parent_cpu_data = p_data->cpu_data[cpu];
| ^~~~~~~~
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_register_notifier':
>> arch/um/include/asm/processor-generic.h:104:18: error: expected identifier before '(' token
104 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:291:15: note: in expansion of macro 'cpu_data'
291 | if (p_data->cpu_data[cpu])
| ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:104:18: error: expected identifier before '(' token
104 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:331:11: note: in expansion of macro 'cpu_data'
331 | p_data->cpu_data[cpu] = parent_cpu_data;
| ^~~~~~~~
vim +104 arch/um/include/asm/processor-generic.h
^1da177e4c3f41 include/asm-um/processor-generic.h Linus Torvalds 2005-04-16 103
^1da177e4c3f41 include/asm-um/processor-generic.h Linus Torvalds 2005-04-16 @104 #define cpu_data (&boot_cpu_data)
^1da177e4c3f41 include/asm-um/processor-generic.h Linus Torvalds 2005-04-16 105 #define current_cpu_data boot_cpu_data
d8fb32f4790f2a arch/um/include/asm/processor-generic.h Anton Ivanov 2021-03-12 106 #define cache_line_size() (boot_cpu_data.cache_alignment)
^1da177e4c3f41 include/asm-um/processor-generic.h Linus Torvalds 2005-04-16 107
:::::: The code at line 104 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[superna9999:amlogic/v5.17/g12-dsi 5/23] drivers/gpu/drm/meson/meson_encoder_dsi.c:72:9: error: implicit declaration of function 'meson_vclk_setup'
by kernel test robot
tree: https://github.com/superna9999/linux amlogic/v5.17/g12-dsi
head: 62dac9179f2937dc08bffe08d15c6846bc4aedb4
commit: e1e87e576f5befbf752a2c7b9c019328f1742d71 [5/23] fixup! WIP: drm/meson: add DSI encoder
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20211212/202112120146.AUKDx0AX-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/superna9999/linux/commit/e1e87e576f5befbf752a2c7b9c019...
git remote add superna9999 https://github.com/superna9999/linux
git fetch --no-tags superna9999 amlogic/v5.17/g12-dsi
git checkout e1e87e576f5befbf752a2c7b9c019328f1742d71
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the superna9999/amlogic/v5.17/g12-dsi HEAD 62dac9179f2937dc08bffe08d15c6846bc4aedb4 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
drivers/gpu/drm/meson/meson_encoder_dsi.c: In function 'meson_encoder_dsi_atomic_enable':
>> drivers/gpu/drm/meson/meson_encoder_dsi.c:72:9: error: implicit declaration of function 'meson_vclk_setup' [-Werror=implicit-function-declaration]
72 | meson_vclk_setup(priv, MESON_VCLK_TARGET_DSI, mode->clock * 1000, 0, 0, 0, false);
| ^~~~~~~~~~~~~~~~
>> drivers/gpu/drm/meson/meson_encoder_dsi.c:72:32: error: 'MESON_VCLK_TARGET_DSI' undeclared (first use in this function)
72 | meson_vclk_setup(priv, MESON_VCLK_TARGET_DSI, mode->clock * 1000, 0, 0, 0, false);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_encoder_dsi.c:72:32: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/meson/meson_encoder_dsi.c:74:9: error: implicit declaration of function 'meson_venc_encoder_dsi_mode_set'; did you mean 'meson_venc_mipi_dsi_mode_set'? [-Werror=implicit-function-declaration]
74 | meson_venc_encoder_dsi_mode_set(priv, mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| meson_venc_mipi_dsi_mode_set
drivers/gpu/drm/meson/meson_encoder_dsi.c: At top level:
>> drivers/gpu/drm/meson/meson_encoder_dsi.c:96:27: error: 'meson_encoder_dsi_atomic_check' undeclared here (not in a function); did you mean 'meson_encoder_dsi_atomic_enable'?
96 | .atomic_check = meson_encoder_dsi_atomic_check,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| meson_encoder_dsi_atomic_enable
drivers/gpu/drm/meson/meson_encoder_dsi.c:84:13: warning: 'meson_encoder_dsi_atomic_disable' defined but not used [-Wunused-function]
84 | static void meson_encoder_dsi_atomic_disable(struct drm_bridge *bridge,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_encoder_dsi.c:45:13: warning: 'meson_encoder_dsi_atomic_enable' defined but not used [-Wunused-function]
45 | static void meson_encoder_dsi_atomic_enable(struct drm_bridge *bridge,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/meson_vclk_setup +72 drivers/gpu/drm/meson/meson_encoder_dsi.c
44
45 static void meson_encoder_dsi_atomic_enable(struct drm_bridge *bridge,
46 struct drm_bridge_state *bridge_state)
47 {
48 struct meson_encoder_dsi *encoder_dsi = bridge_to_meson_encoder_dsi(bridge);
49 struct drm_atomic_state *state = bridge_state->base.state;
50 struct meson_drm *priv = encoder_dsi->priv;
51 struct drm_connector_state *conn_state;
52 struct drm_crtc_state *crtc_state;
53 struct drm_connector *connector;
54 struct drm_display_mode *mode;
55
56 connector = drm_atomic_get_new_connector_for_encoder(state, bridge->encoder);
57 if (WARN_ON(!connector))
58 return;
59
60 conn_state = drm_atomic_get_new_connector_state(state, connector);
61 if (WARN_ON(!conn_state))
62 return;
63
64 crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
65 if (WARN_ON(!crtc_state))
66 return;
67
68 mode = &crtc_state->adjusted_mode;
69 if (WARN_ON(!mode))
70 return;
71
> 72 meson_vclk_setup(priv, MESON_VCLK_TARGET_DSI, mode->clock * 1000, 0, 0, 0, false);
73
74 meson_venc_encoder_dsi_mode_set(priv, mode);
75
76 meson_encl_load_gamma(priv);
77
78 writel_bits_relaxed(BIT(3), BIT(3), priv->io_base + _REG(ENCL_VIDEO_MODE_ADV));
79 writel_relaxed(0, priv->io_base + _REG(ENCL_TST_EN));
80
81 writel_relaxed(1, priv->io_base + _REG(ENCL_VIDEO_EN));
82 }
83
84 static void meson_encoder_dsi_atomic_disable(struct drm_bridge *bridge,
85 struct drm_bridge_state *bridge_state)
86 {
87 struct meson_encoder_dsi *meson_encoder_dsi =
88 bridge_to_meson_encoder_dsi(bridge);
89 struct meson_drm *priv = meson_encoder_dsi->priv;
90
91 writel_relaxed(0, priv->io_base + _REG(ENCL_VIDEO_EN));
92 }
93
94 static const struct drm_bridge_funcs meson_encoder_dsi_bridge_funcs = {
95 .attach = meson_encoder_dsi_attach,
> 96 .atomic_check = meson_encoder_dsi_atomic_check,
97 .atomic_enable = meson_encoder_dsi_atomic_check,
98 .atomic_disable = meson_encoder_dsi_atomic_check,
99 .atomic_check = meson_encoder_dsi_atomic_check,
100 .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
101 .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
102 .atomic_reset = drm_atomic_helper_bridge_reset,
103 };
104
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week