lkml.org 
[lkml]   [2014]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 03/46] kernel: Move prototype declaration to header file include/linux/cpu.h
From
Date
On Thu, 2014-02-27 at 16:42 +0530, Rashika Kheria wrote:
> Add prototype declaration to header file include/linux/cpu.h because
> they are used by more than one file.
>
> This eliminates the following warning in kernel/cpu.c:
> kernel/cpu.c:512:13: warning: no previous prototype for ‘arch_enable_nonboot_cpus_begin’ [-Wmissing-prototypes]
> kernel/cpu.c:516:13: warning: no previous prototype for ‘arch_enable_nonboot_cpus_end’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> ---
> arch/x86/kernel/smpboot.c | 1 +
> include/linux/cpu.h | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index a32da80..e428764 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -49,6 +49,7 @@
> #include <linux/bootmem.h>
> #include <linux/err.h>
> #include <linux/nmi.h>
> +#include <linux/cpu.h>
> #include <linux/tboot.h>
> #include <linux/stackprotector.h>
> #include <linux/gfp.h>
> diff --git a/include/linux/cpu.h b/include/linux/cpu.h
> index 03e235ad..9f633b0 100644
> --- a/include/linux/cpu.h
> +++ b/include/linux/cpu.h
> @@ -38,6 +38,8 @@ extern void cpu_remove_dev_attr(struct device_attribute *attr);
>
> extern int cpu_add_dev_attr_group(struct attribute_group *attrs);
> extern void cpu_remove_dev_attr_group(struct attribute_group *attrs);
> +void arch_enable_nonboot_cpus_begin(void);
> +void arch_enable_nonboot_cpus_end(void);

Can we simply include linux/smp.h, which defines them already?

Thanks,
-Toshi



>
> #ifdef CONFIG_HOTPLUG_CPU
> extern void unregister_cpu(struct cpu *cpu);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-02-27 16:42    [W:0.259 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site