summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2012-09-03 21:13:35 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-09-11 15:13:50 -0400
commitaf2c8ffe56133928355d1d51978b35115ffbbc2a (patch)
treed6870b9a17a2382922ab761a64c785cacaebed45 /drivers/net/wireless
parent959cd68d0813b8c0fe62ae90f3d30e26c347cd5f (diff)
downloadblackbird-op-linux-af2c8ffe56133928355d1d51978b35115ffbbc2a.tar.gz
blackbird-op-linux-af2c8ffe56133928355d1d51978b35115ffbbc2a.zip
brcm80211: Remove bogus memcpy in ai_detach
gcc 4.8 warns for this memcpy. While the copy size is correct, the whole copy seems to be a nop because the destination is never used, and there's no need to use memcpy to copy pointers anyways. And the type of the pointer was wrong, but at least those are always the same. Just remove it. /backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c: In function 'ai_detach': /backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c:539:32: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'struct si_pub **' as the destination; expected 'struct si_pub *' or an explicit length [-Wsizeof-pointer-memaccess] memcpy(&si_local, &sih, sizeof(struct si_pub **)); ^ Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/aiutils.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
index 8c9345dd37d2..b89f1272b93f 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
@@ -535,9 +535,6 @@ void ai_detach(struct si_pub *sih)
{
struct si_info *sii;
- struct si_pub *si_local = NULL;
- memcpy(&si_local, &sih, sizeof(struct si_pub **));
-
sii = container_of(sih, struct si_info, pub);
if (sii == NULL)
OpenPOWER on IntegriCloud