[PATCH] pxa: fix cpu_is_pxa*() not expanded to zero when not configured
Eric Miao
eric.y.miao at gmail.com
Tue Sep 7 05:48:26 EDT 2010
On Tue, Sep 7, 2010 at 5:35 PM, Sergei Shtylyov <sshtylyov at mvista.com> wrote:
> Hello.
>
> On 07-09-2010 8:09, Eric Miao wrote:
>
>> Could you give this a run?
>
>> diff --git a/arch/arm/mach-pxa/include/mach/hardware.h
>> b/arch/arm/mach-pxa/include/mach/hardware.h
>> index 7f64d24..b036500 100644
>> --- a/arch/arm/mach-pxa/include/mach/hardware.h
>> +++ b/arch/arm/mach-pxa/include/mach/hardware.h
>> @@ -264,23 +264,35 @@
>> *<= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
>> * == 0x3 for pxa300/pxa310/pxa320
>> */
>> +#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
>> #define __cpu_is_pxa2xx(id) \
>> ({ \
>> unsigned int _id = (id)>> 13& 0x7; \
>> _id<= 0x2; \
>> })
>> +#else
>> +#define __cpu_is_pxa2xx(id) (0)
>
> Why enclose 0 in parens?
>
Just one of some coding style habits. Constant in parens in #define
will always be a bit safer.
> WBR, Sergei
>
More information about the linux-arm-kernel
mailing list