Re: [PATCH] Endian-annotate struct iphdr

2006-01-07 Thread Al Viro
On Sat, Jan 07, 2006 at 01:05:53PM -0800, David S. Miller wrote: > Why are you shifting "addr" instead of "n"? Because of a braino done when (re)typing it? ;-) - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH] Endian-annotate struct iphdr

2006-01-07 Thread David S. Miller
From: Al Viro <[EMAIL PROTECTED]> Date: Sat, 7 Jan 2006 12:26:06 + > OK. Another question: do you have any objections against > static inline void ip_eth_mc_map(__be32 addr, char *buf) > { > __u32 n=ntohl(addr); > buf[0]=0x01; > buf[1]=0x00; > buf[2]=0x5e; >

Re: [PATCH] Endian-annotate struct iphdr

2006-01-07 Thread Linus Torvalds
On Sat, 7 Jan 2006, Al Viro wrote: > > [following is for people familiar with sparse internals; everybody else > can safely skip it] > > ... > > Objections? Basically, from C POV any fouled value is int or unsigned int > and we avoid generating a warning only if its upper bits will eventually

Re: [PATCH] Endian-annotate struct iphdr

2006-01-07 Thread Al Viro
On Sat, Jan 07, 2006 at 02:03:42AM -0800, David S. Miller wrote: > From: Al Viro <[EMAIL PROTECTED]> > Date: Sat, 7 Jan 2006 09:39:10 + > > > BTW, is there any reason why > > static inline void ip_eth_mc_map(u32 addr, char *buf) > > { > > addr=ntohl(addr); > > buf[0]=0x01; > >

Re: [PATCH] Endian-annotate struct iphdr

2006-01-07 Thread David S. Miller
From: Al Viro <[EMAIL PROTECTED]> Date: Sat, 7 Jan 2006 09:39:10 + > BTW, is there any reason why > static inline void ip_eth_mc_map(u32 addr, char *buf) > { > addr=ntohl(addr); > buf[0]=0x01; > buf[1]=0x00; > buf[2]=0x5e; > buf[5]=addr&0xFF; > a

Re: [PATCH] Endian-annotate struct iphdr

2006-01-07 Thread Al Viro
On Sat, Jan 07, 2006 at 12:59:15AM -0800, David S. Miller wrote: > Why not just make some kind of "negate()" macro that hides away all of > the typing issues? Another way to describe the operation is as a > xor of X with an all-1's bitmask the same size of X. Maybe that helps > describe it better

Re: [PATCH] Endian-annotate struct iphdr

2006-01-07 Thread David S. Miller
From: Al Viro <[EMAIL PROTECTED]> Date: Sat, 7 Jan 2006 08:44:42 + [ BTW Al, I noticed you subscribed to netdev, you don't need to do that if all you want to do is make a posting and be involved in that particular discussion. If you really are interested in everything else that goes on

Re: [PATCH] Endian-annotate struct iphdr

2006-01-07 Thread Al Viro
BTW, why does csum_tcpudp_nofold() have such a prototype? It takes IP addresses as unsigned long and proto as unsigned short; the former is bloody odd on 64bit boxen and the latter is bloody odd, period. The value we are interested in is 8bit; all callers pass either an explicit constant

Re: [PATCH] Endian-annotate struct iphdr

2006-01-06 Thread Al Viro
On Fri, Jan 06, 2006 at 01:25:03PM -0800, David S. Miller wrote: > From: Alexey Dobriyan <[EMAIL PROTECTED]> > Date: Fri, 6 Jan 2006 23:18:37 +0300 > > > And fix trivial warnings that emerged. > > > > Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> > > Applied. OK, will merge... I've actual

Re: [PATCH] Endian-annotate struct iphdr

2006-01-06 Thread David S. Miller
From: Alexey Dobriyan <[EMAIL PROTECTED]> Date: Fri, 6 Jan 2006 23:18:37 +0300 > And fix trivial warnings that emerged. > > Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Applied. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTE

[PATCH] Endian-annotate struct iphdr

2006-01-06 Thread Alexey Dobriyan
And fix trivial warnings that emerged. Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> --- include/linux/ip.h | 10 +- net/ipv4/ip_fragment.c |2 +- net/ipv4/ip_output.c |4 ++-- net/ipv4/ipvs/ip_vs_xmit.c |2 +- 4 files changed, 9 insertions(+), 9 dele