From: Andrew Morton <akpm@linux-foundation.org>
To: Paul Mackerras <paulus@samba.org>
Cc: Mark Lord <liml@rtr.ca>,
Harvey Harrison <harvey.harrison@gmail.com>,
linux-arch <linux-arch@vger.kernel.org>,
Jeff Garzik <jeff@garzik.org>,
linux-ide <linux-ide@vger.kernel.org>
Subject: Re: [PATCH 05/37] ata: use get/put_endian helpers
Date: Thu, 29 May 2008 22:04:50 -0700 [thread overview]
Message-ID: <20080529220450.2f701d93.akpm@linux-foundation.org> (raw)
In-Reply-To: <18495.32327.521211.508818@cargo.ozlabs.ibm.com>
On Fri, 30 May 2008 14:10:47 +1000 Paul Mackerras <paulus@samba.org> wrote:
> > > What's the point here?
> >
> > Readability and maintainability. Once one becomes familar with a
> > particular idion like this you can read it and say "ah, I know what
> > that's doing" rather than having to peer at every character and work it
> > out at each site where it happens.
> >
> > As usual: a PITA now, but better long-term.
> >
> > otoh,
> >
> > - I think the args are backwards
>
> I think you just admitted that the new version is less readable. At
> least with an '=' operator you know which side is the thing that's
> being modified. With a put_XXX function, I would have to go look up
> the definition (particularly since outb et al. are also the wrong way
> around, i.e. have the destination as the second argument).
Well yes, but you don't have to worry about that when reviewing because
you know the compiler will catch reversals.
Still not terribly keen about it all, but geeze the code which it is
trying to clarify is godawful:
*(__le32 *)(buf + i) = cpu_to_le32(addr);
wtf?
Then again the replacement
put_le32(addr, (__le32 *)(buf + i));
is still wtf.
next prev parent reply other threads:[~2008-05-30 5:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 20:18 [PATCH 05/37] ata: use get/put_endian helpers Harvey Harrison
2008-05-29 20:18 ` Harvey Harrison
2008-05-30 2:26 ` Mark Lord
2008-05-30 2:52 ` Andrew Morton
2008-05-30 3:37 ` Harvey Harrison
2008-05-30 4:08 ` Andrew Morton
2008-05-30 4:08 ` Andrew Morton
2008-05-30 4:14 ` Harvey Harrison
2008-05-30 4:10 ` Paul Mackerras
2008-05-30 4:10 ` Paul Mackerras
2008-05-30 4:18 ` Harvey Harrison
2008-05-30 4:18 ` Harvey Harrison
2008-05-30 5:04 ` Andrew Morton [this message]
2008-05-30 5:04 ` Andrew Morton
2008-05-30 13:15 ` Mark Lord
2008-05-30 13:15 ` Mark Lord
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=20080529220450.2f701d93.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=harvey.harrison@gmail.com \
--cc=jeff@garzik.org \
--cc=liml@rtr.ca \
--cc=linux-arch@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=paulus@samba.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