Re: [RFC][PATCH] byteorder: introduce le32_add_cpu & friends to core

2007-12-31 Thread Marcin Slusarz
On Mon, Dec 31, 2007 at 11:38:01AM -0800, Mark Fasheh wrote: > On Sun, Dec 30, 2007 at 08:06:34PM +0100, Marcin Slusarz wrote: > > There are many places where these functions would be useful. > > (just look at: grep -r 'cpu_to_[ble12346]*([ble12346]*_to_cpu.*[-+]' > > linux-src/) > > What do you t

Re: [RFC][PATCH] byteorder: introduce le32_add_cpu & friends to core

2007-12-31 Thread Mark Fasheh
On Mon, Dec 31, 2007 at 09:17:32AM +, Christoph Hellwig wrote: > > be32_add is shorter than be32_add_cpu but I think it's not clear > > whether second parameter is in native byte order or not. > > Then again adding foreing endian values doesn't make much sense. > > If you insist on your namin

Re: [RFC][PATCH] byteorder: introduce le32_add_cpu & friends to core

2007-12-31 Thread Mark Fasheh
On Sun, Dec 30, 2007 at 08:06:34PM +0100, Marcin Slusarz wrote: > There are many places where these functions would be useful. > (just look at: grep -r 'cpu_to_[ble12346]*([ble12346]*_to_cpu.*[-+]' > linux-src/) > What do you think? > > ps: this patch depends on http://lkml.org/lkml/2007/12/25/35

Re: [RFC][PATCH] byteorder: introduce le32_add_cpu & friends to core

2007-12-31 Thread Christoph Hellwig
On Sun, Dec 30, 2007 at 10:49:34PM +0100, Marcin Slusarz wrote: > I found it in XFS only. Did I miss something? These helpers come from ocfs2 which has both be and le variants. > be32_add is shorter than be32_add_cpu but I think it's not clear > whether second parameter is in native byte order or

Re: [RFC][PATCH] byteorder: introduce le32_add_cpu & friends to core

2007-12-30 Thread Marcin Slusarz
On Sun, Dec 30, 2007 at 07:18:25PM +, Christoph Hellwig wrote: > On Sun, Dec 30, 2007 at 08:06:34PM +0100, Marcin Slusarz wrote: > > There are many places where these functions would be useful. > > (just look at: grep -r 'cpu_to_[ble12346]*([ble12346]*_to_cpu.*[-+]' > > linux-src/) > > What do

Re: [RFC][PATCH] byteorder: introduce le32_add_cpu & friends to core

2007-12-30 Thread Christoph Hellwig
On Sun, Dec 30, 2007 at 08:06:34PM +0100, Marcin Slusarz wrote: > There are many places where these functions would be useful. > (just look at: grep -r 'cpu_to_[ble12346]*([ble12346]*_to_cpu.*[-+]' > linux-src/) > What do you think? > > ps: this patch depends on http://lkml.org/lkml/2007/12/25/35

[RFC][PATCH] byteorder: introduce le32_add_cpu & friends to core

2007-12-30 Thread Marcin Slusarz
There are many places where these functions would be useful. (just look at: grep -r 'cpu_to_[ble12346]*([ble12346]*_to_cpu.*[-+]' linux-src/) What do you think? ps: this patch depends on http://lkml.org/lkml/2007/12/25/35 -- add inline functions which add native byte order variable to little/big