From: David Miller <davem@davemloft.net>
To: joe@perches.com
Cc: mugunthanvnm@ti.com, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 1/1] drivers: net: davinci_cpdma: acknowledge interrupt properly
Date: Fri, 15 Feb 2013 15:20:25 -0500 (EST) [thread overview]
Message-ID: <20130215.152025.1605170079652952030.davem@davemloft.net> (raw)
In-Reply-To: <1360959539.21068.5.camel@joe-AO722>
From: Joe Perches <joe@perches.com>
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 <mugunthanvnm@ti.com>
>> 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.
next prev parent reply other threads:[~2013-02-15 20:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 18:26 [PATCH v2 1/1] drivers: net: davinci_cpdma: acknowledge interrupt properly Mugunthan V N
2013-02-15 20:05 ` David Miller
2013-02-15 20:05 ` David Miller
2013-02-17 9:35 ` Mugunthan V N
2013-02-15 20:18 ` Joe Perches
2013-02-15 20:20 ` David Miller [this message]
2013-02-17 9:34 ` Mugunthan V N
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130215.152025.1605170079652952030.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).