Re: [PATCH v2] hwmon (coretemp): Fix build breakage if SMP is undefined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 27, 2010 at 07:44:01PM -0400, Linus Torvalds wrote:
[...]

>  include/linux/smp.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/smp.h b/include/linux/smp.h
> index cfa2d20..ad48077 100644
> --- a/include/linux/smp.h
> +++ b/include/linux/smp.h
> @@ -149,6 +149,8 @@ smp_call_function_any(const struct cpumask *mask, void (*func)(void *info),
>  	return smp_call_function_single(0, func, info, wait);
>  }
>  
> +static inline const struct cpumask *cpu_sibling_mask(int cpu) { return NULL; }
> +
>  #endif /* !SMP */
>  
Not that simple. cpu_sibling_mask()  is defined in asm/smp.h, which is only
included from linux/smp.h if SMP is defined. But many other files do include
asm/smp.h directly. This causes the following error all over the place
if CONFIG_SMP is not defined.

In file included from /opt/scratch/groeck/linux-staging/arch/x86/include/asm/apic.h:473,
                 from arch/x86/xen/enlighten.c:46:
/opt/scratch/groeck/linux-staging/arch/x86/include/asm/smp.h:29: error: conflicting types for cpu_sibling_mask
include/linux/smp.h:152: note: previous definition of cpu_sibling_mask was here

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux