Re: [PATCH] sunrpc: add endian annotations

2005-09-06 Thread viro
On Tue, Sep 06, 2005 at 12:21:05PM +0400, Alexey Dobriyan wrote: > * usual s/u32/__be32/. > * add svc_getnl(): > Take network-endian value from buffer, convert to host-endian > one and return it. > * add svc_putnl(): > Take host-endian value, convert to network-endian one and put

[PATCH] sunrpc: add endian annotations

2005-09-06 Thread Alexey Dobriyan
* usual s/u32/__be32/. * add svc_getnl(): Take network-endian value from buffer, convert to host-endian one and return it. * add svc_putnl(): Take host-endian value, convert to network-endian one and put it into a buffer. * convert to svc_getnl(), svc_putnl(). Signe

Re: [PATCH] sunrpc: add endian annotations

2005-09-06 Thread Alexey Dobriyan
On Mon, Sep 05, 2005 at 09:48:57PM +0100, [EMAIL PROTECTED] wrote: > On Mon, Sep 05, 2005 at 10:55:58PM +0400, Alexey Dobriyan wrote: > > * add svc_getnl(), svc_putnl() in spirit of svc_getu32(), svc_putu32(). > > They return and accept __be32 instead of __u32, respectively. > > * convert to svc_

Re: [PATCH] sunrpc: add endian annotations

2005-09-05 Thread viro
BTW, _all_ callers of svc_getnl() have the form ntohl(svc_getnl(...)). Which means that at least this one definitely should convert to host-endian before returning... - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More major

Re: [PATCH] sunrpc: add endian annotations

2005-09-05 Thread viro
On Mon, Sep 05, 2005 at 10:55:58PM +0400, Alexey Dobriyan wrote: > * usual s/u32/__be32/. > * add svc_getnl(), svc_putnl() in spirit of svc_getu32(), svc_putu32(). > They return and accept __be32 instead of __u32, respectively. > * convert to svc_getnl(), svc_putnl(). Umm... I'm not particulary

[PATCH] sunrpc: add endian annotations

2005-09-05 Thread Alexey Dobriyan
* usual s/u32/__be32/. * add svc_getnl(), svc_putnl() in spirit of svc_getu32(), svc_putu32(). They return and accept __be32 instead of __u32, respectively. * convert to svc_getnl(), svc_putnl(). Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- include/linux/sunrpc/auth.h | 16