From: Francois Romieu <romieu@fr.zoreil.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: netdev@vger.kernel.org, jgarzik@pobox.com
Subject: Re: [PATCH] via-velocity big-endian support
Date: Wed, 26 Dec 2007 00:21:35 +0100 [thread overview]
Message-ID: <20071225232135.GA22589@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20071225225606.GC27894@ZenIV.linux.org.uk>
Al Viro <viro@ZenIV.linux.org.uk> :
[...]
> > Can we avoid using cpu_to_leXY here for consistency sake within the driver
> > (and among different drivers as well) ?
>
> ???
I admit that it is a bit late for the Xmas wishlist. Compare it with:
@@ -1409,31 +1409,33 @@ static int velocity_rx_srv(struct velocity_info *vptr, int status)
do {
struct rx_desc *rd = vptr->rd_ring + rd_curr;
+ u16 rsr;
[...]
+ rsr = le16_to_cpu(rd->rdesc0.RSR);
[...]
- if (rd->rdesc0.RSR & RSR_CRC)
+ if (rsr & RSR_CRC)
^^^^^^^ this one is #define RSR_CRC 0x0002
-> some descriptor bits are now declared with an explicit endianness
while others are not (whence "u16 rsr" where "__le16 rsr" whould
have fit). Both are fine but it would not hurt to stick with one
convention in a given driver.
--
Ueimor
next prev parent reply other threads:[~2007-12-25 23:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-24 5:06 [PATCH] via-velocity big-endian support Al Viro
2007-12-25 22:43 ` Francois Romieu
2007-12-25 22:56 ` Al Viro
2007-12-25 23:21 ` Francois Romieu [this message]
2007-12-28 18:40 ` Al Viro
2008-01-07 23:18 ` Francois Romieu
2008-01-08 5:34 ` linux
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=20071225232135.GA22589@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).