[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130429.122934.2073602835665028801.davem@davemloft.net>
Date: Mon, 29 Apr 2013 12:29:34 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: gang.chen@...anux.com
Cc: dborkman@...hat.com, c.aeschlimann@...-group.ch,
sergei.shtylyov@...entembedded.com,
alex.bluesman.smirnov@...il.com, dbaryshkov@...il.com,
linux-zigbee-devel@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: Re: [PATCH v5] net: mac802154: comparision issue of type cast,
finding by EXTRA_CFLAGS=-W
From: Chen Gang <gang.chen@...anux.com>
Date: Thu, 25 Apr 2013 18:49:55 +0800
>
> Change MAC802154_CHAN_NONE from ~(u8)0 to 0xff, or the comparison in
> mac802154_wpan_xmit() for ``chan == MAC802154_CHAN_NONE'' will not
> succeed.
>
> This bug can be boiled down to ``u8 foo = 0xff; if (foo == ~(u8)0)
> [...] else [...]'' where the condition will always take the else
> branch.
>
> Signed-off-by: Chen Gang <gang.chen@...anux.com>
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists