Re: [PATCH] workqueue: move function definitions within CONFIG_SMP block

From: Tejun Heo
Date: Wed May 23 2018 - 13:24:27 EST


On Tue, May 22, 2018 at 09:47:32PM +0200, Mathieu Malaterre wrote:
> In commit 7ee681b25284 ("workqueue: Convert to state machine callbacks"),
> three new function definitions were added: âworkqueue_prepare_cpuâ,
> âworkqueue_online_cpuâ and âworkqueue_offline_cpuâ.
>
> Move these function definitions within a CONFIG_SMP block since they are
> not used outside of it. This will match function declarations in header
> <include/linux/workqueue.h>, and silence the following gcc warning (W=1):
>
> kernel/workqueue.c:4743:5: warning: no previous prototype for âworkqueue_prepare_cpuâ [-Wmissing-prototypes]
> kernel/workqueue.c:4756:5: warning: no previous prototype for âworkqueue_online_cpuâ [-Wmissing-prototypes]
> kernel/workqueue.c:4783:5: warning: no previous prototype for âworkqueue_offline_cpuâ [-Wmissing-prototypes]
>
> Signed-off-by: Mathieu Malaterre <malat@xxxxxxxxxx>

Applied to wq/for-4.18.

Thanks.

--
tejun