Commit 4ec71a9e authored by Jason A. Donenfeld's avatar Jason A. Donenfeld
Browse files

ANDROID: cpu/hotplug: call perf event through function pointer



After commit ca927bd2 ("ANDROID: cpu/hotplug: avoid breaking Android
ABI by fusing cpuhp steps") a build error appears with
CONFIG_PERF_EVENTS disabled:

In file included from ./include/uapi/linux/posix_types.h:5,
                 from ./include/uapi/linux/types.h:14,
                 from ./include/linux/types.h:6,
                 from ./include/linux/limits.h:6,
                 from ./include/linux/kernel.h:7,
                 from ./include/linux/sched/mm.h:5,
                 from kernel/cpu.c:6:
kernel/cpu.c: In function 'random_and_perf_prepare_fusion':
./include/linux/stddef.h:8:14: error: called object is not a function or function pointer
 #define NULL ((void *)0)
              ^
./include/linux/perf_event.h:1607:29: note: in expansion of macro 'NULL'
 #define perf_event_init_cpu NULL
                             ^~~~
kernel/cpu.c:1686:2: note: in expansion of macro 'perf_event_init_cpu'
  perf_event_init_cpu(cpu);
  ^~~~~~~~~~~~~~~~~~~
  CC      kernel/power/console.o
make[1]: *** [scripts/Makefile.build:287: kernel/cpu.o] Error 1
make[1]: *** Waiting for unfinished jobs....

Fix this by always calling through the function pointers like the
original code.

Fixes: ca927bd2 ("ANDROID: cpu/hotplug: avoid breaking Android ABI by fusing cpuhp steps")
Reported-by: default avatarAnand Gore <anand.gore@broadcom.com>
Reported-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
Cc: Todd Kjos <tkjos@google.com>
Change-Id: I46a7c4a056d96eb531c06d8d0bbfdc7eac1cb271
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
parent 7f2e600b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment