* [patch] brcm80211: smac: precendence bug in wlc_phy_attach()
@ 2011-12-15 11:23 Dan Carpenter
2011-12-15 11:49 ` Arend van Spriel
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-12-15 11:23 UTC (permalink / raw)
To: Brett Rudley
Cc: Henry Ptasinski, Roland Vossen, Arend van Spriel,
Franky (Zhenhui) Lin, Kan Yan, John W. Linville,
Pieter-Paul Giesberts, linux-wireless, kernel-janitors
Negate has higher precendence than compare and since neither zero nor
one are equal to four or eight the original condition is always false.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
index 5b57caa..264f8c4 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
@@ -482,8 +482,8 @@ wlc_phy_attach(struct shared_phy *sh, struct bcma_device *d11core,
pi->pubpi.phy_corenum = PHY_CORE_NUM_2;
pi->pubpi.ana_rev = (phyversion & PV_AV_MASK) >> PV_AV_SHIFT;
- if (!pi->pubpi.phy_type == PHY_TYPE_N &&
- !pi->pubpi.phy_type == PHY_TYPE_LCN)
+ if (pi->pubpi.phy_type != PHY_TYPE_N &&
+ pi->pubpi.phy_type != PHY_TYPE_LCN)
goto err;
if (bandtype == BRCM_BAND_5G) {
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] brcm80211: smac: precendence bug in wlc_phy_attach()
2011-12-15 11:23 [patch] brcm80211: smac: precendence bug in wlc_phy_attach() Dan Carpenter
@ 2011-12-15 11:49 ` Arend van Spriel
0 siblings, 0 replies; 2+ messages in thread
From: Arend van Spriel @ 2011-12-15 11:49 UTC (permalink / raw)
To: Dan Carpenter
Cc: Brett Rudley, Henry Ptasinski, Roland Vossen,
Franky (Zhenhui) Lin, Kan Yan, John W. Linville,
Pieter-Paul Giesberts, linux-wireless@vger.kernel.org,
kernel-janitors@vger.kernel.org
On 12/15/2011 12:23 PM, Dan Carpenter wrote:
> Negate has higher precendence than compare and since neither zero nor
> one are equal to four or eight the original condition is always false.
>
Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Gr. AvS
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-15 11:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-15 11:23 [patch] brcm80211: smac: precendence bug in wlc_phy_attach() Dan Carpenter
2011-12-15 11:49 ` Arend van Spriel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).