From: Joe Perches <[email protected]>
Date: Fri, 15 Feb 2013 12:18:59 -0800

> On Fri, 2013-02-15 at 15:05 -0500, David Miller wrote:
>> From: Mugunthan V N <[email protected]>
>> Date: Thu, 14 Feb 2013 23:56:46 +0530
>> 
>> > +enum {
>> > +     CPDMA_EOI_RX_THRESH = 0,
>> > +     CPDMA_EOI_RX,
>> > +     CPDMA_EOI_TX,
>> > +     CPDMA_EOI_MISC,
>> > +};
>> 
>> Do not use enumerations for hardware register values, which must be
>> exact, otherwise you are potentially going to succumb to the vagaries
>> of C language enumeration value assignment.
> 
> Vagaries?
> 
> In what way is c enumeration (6.7.2.2) vague?
> char vs int?  Isn't smaller mostly better?
> 
> Concern about possible future reordering given an
> insertion or deletion might be the only consideration
> I could imagine.

Right.  That's why you should use explicit CPP defines for
register offsets and values.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to