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:Anand Gore <anand.gore@broadcom.com> Reported-by:
Florian Fainelli <florian.fainelli@broadcom.com> Cc: Todd Kjos <tkjos@google.com> Change-Id: I46a7c4a056d96eb531c06d8d0bbfdc7eac1cb271 Signed-off-by:
Jason A. Donenfeld <Jason@zx2c4.com>
Loading