This is a note to let you know that I've just added the patch titled net: mac802154: comparision issue of type cast, finding by EXTRA_CFLAGS=-W to the 3.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-mac802154-comparision-issue-of-type-cast-finding-by-extra_cflags-w.patch and it can be found in the queue-3.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From f0cd13a2baac658a8ce21427800ba4cc7867aa22 Mon Sep 17 00:00:00 2001 From: Chen Gang <gang.chen@xxxxxxxxxxx> Date: Thu, 25 Apr 2013 00:49:55 +0000 Subject: net: mac802154: comparision issue of type cast, finding by EXTRA_CFLAGS=-W From: Chen Gang <gang.chen@xxxxxxxxxxx> [ Upstream commit 2c1bbbffa0b644fab4f91878cde0c2e8f52e2dcc ] 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@xxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/mac802154/mac802154.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mac802154/mac802154.h +++ b/net/mac802154/mac802154.h @@ -90,7 +90,7 @@ struct mac802154_sub_if_data { #define MAC802154_MAX_XMIT_ATTEMPTS 3 -#define MAC802154_CHAN_NONE (~(u8)0) /* No channel is assigned */ +#define MAC802154_CHAN_NONE 0xff /* No channel is assigned */ extern struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced; extern struct ieee802154_mlme_ops mac802154_mlme_wpan; Patches currently in stable-queue which might be from gang.chen@xxxxxxxxxxx are queue-3.9/net-mac802154-comparision-issue-of-type-cast-finding-by-extra_cflags-w.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html