lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1436361460-30554-1-git-send-email-hofrat@osadl.org>
Date:	Wed,  8 Jul 2015 15:17:40 +0200
From:	Nicholas Mc Guire <hofrat@...dl.org>
To:	Arend van Spriel <arend@...adcom.com>
Cc:	Brett Rudley <brudley@...adcom.com>,
	"Franky (Zhenhui) Lin" <frankyl@...adcom.com>,
	Hante Meuleman <meuleman@...adcom.com>,
	Kalle Valo <kvalo@...eaurora.org>,
	Joe Perches <joe@...ches.com>, linux-wireless@...r.kernel.org,
	brcm80211-dev-list@...adcom.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [BUG ?] brcmsmac: condition with no effect

From: Nicholas Mc Guire <hofrat@...dl.org>                                      

scanning for trivial bug-patters with coccinelle spatches returned:
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c:3391
        WARNING: condition with no effect (if branch == else)

added in 'commit 5b435de0d786 ("net: wireless: add brcm80211 drivers")'

drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c:wlc_lcnphy_deaf_mode()
(line numbers are from linux-next v4.2-rc2)
3391         if (LCNREV_LT(pi->pubpi.phy_rev, 2)) {
3392                 mod_phy_reg(pi, 0x4b0, (0x1 << 5), (mode) << 5);                                       
3393                 mod_phy_reg(pi, 0x4b1, (0x1 << 9), 0 << 9);
3394         } else {
3395                 mod_phy_reg(pi, 0x4b0, (0x1 << 5), (mode) << 5);
3396                 mod_phy_reg(pi, 0x4b1, (0x1 << 9), 0 << 9);
3397         }

Can't figure out what the intent of this condition is but it currently has
no effect as if == else and this most likely is not the intent.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ