Re: [PATCH 05/37] ata: use get/put_endian helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 30 May 2008 14:10:47 +1000 Paul Mackerras <paulus@xxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux