[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B725C@saturn3.aculab.com>
Date: Thu, 30 May 2013 13:40:27 +0100
From: "David Laight" <David.Laight@...LAB.COM>
To: "Antonio Quartulli" <ordex@...istici.org>
Cc: "Ben Hutchings" <bhutchings@...arflare.com>,
"David Miller" <davem@...emloft.net>, <amwang@...hat.com>,
<netdev@...r.kernel.org>, <horms@...ge.net.au>
Subject: RE: [Patch net-next] net: clean up skb headers code
> > Except I copied the wrong format line :-( It should be:
> > printf("%x %x %x %x %x %x %lx %lx %llx %llx\n",
> > ALL_ONES(a), ALL_ONES(b), ALL_ONES(c), ALL_ONES(d),
> > ALL_ONES(e), ALL_ONES(f), ALL_ONES(g), ALL_ONES(h),
> > ALL_ONES(i), ALL_ONES(j));
>
> Oh ok, I see the issue now.
>
> So the problem is that this value gets bigger than what the maximal
> value for the type passed as argument is supposed to be.
>
> I think the issue is clear now and why a double cast is good.
It is much clearer to just use 0xffff.
Although a named #define constant is more appropriate
for the code itself.
David
Powered by blists - more mailing lists