Re: [PATCH] hotplug: make register and unregister notifier API symmetric

From: Michal Hocko
Date: Mon Dec 05 2016 - 01:08:48 EST


On Sat 03-12-16 13:15:42, kbuild test robot wrote:
> Hi Michal,
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.9-rc7 next-20161202]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Michal-Hocko/hotplug-make-register-and-unregister-notifier-API-symmetric/20161203-114815
> config: i386-randconfig-r0-201648 (attached as .config)
> compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
>
> All errors (new ones prefixed by >>):
>
> arch/x86/oprofile/built-in.o: In function `nmi_timer_shutdown':
> >> nmi_timer_int.c:(.text+0x238b): undefined reference to `__unregister_cpu_notifier'
> arch/x86/oprofile/built-in.o: In function `nmi_shutdown':
> nmi_int.c:(.text+0x2793): undefined reference to `__unregister_cpu_notifier'

Ohh, right. I have missed that unregister functions definitions are
guarded as well. This patch should hopefully be correct finally.
Please note it also exports register/unregister callbacks when
CONFIG_HOTPLUG_CPU is not defined which is not really needed strictly
speaking because those are only used when !MODULE but I would rather
not make the code more complicated. If maintainers prefer I can guard
exports separately of course.
---