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

From: Guenter Roeck
Date: Mon Sep 27 2010 - 09:16:12 EST


On Mon, Sep 27, 2010 at 08:59:46AM -0400, Ingo Molnar wrote:
>
> * Guenter Roeck <guenter.roeck@xxxxxxxxxxxx> wrote:
>
> > +#ifdef CONFIG_SMP
> > +#endif
> > +#ifdef CONFIG_SMP
> > +#endif
>
> Hm, this tickles my uglo-meter. Is there no cleaner way, preferably one
> that doesnt involve preprocessor directives?
>
Mine too, but not at 6am in the morning (actually 5am when I wrote it),
and right now I thought it more important to fix the kernel breakage.

I'll think about it and see if I can find something better. But I would
still prefer to have this one applied and submit a cleaner solution later on
(if I find one). Preferrably, as you suggested, without any CONFIG_SMP
declarations.

Fwiw, there are several similar "#ifdef CONFIG_SMP" in this driver already,
so it would definitely be good to find a cleaner solution.

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