]> git.baikalelectronics.ru Git - kernel.git/commit
brcm80211: Remove bogus memcpy in ai_detach
authorAndi Kleen <andi@firstfloor.org>
Mon, 3 Sep 2012 19:13:35 +0000 (21:13 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 11 Sep 2012 19:13:50 +0000 (15:13 -0400)
commit082c4519fb5d76a2ef80d4e13fdfc7b1aabf06c6
treed6870b9a17a2382922ab761a64c785cacaebed45
parent617e5ed660d7dcfd5ea216d1a4278f103d7132ae
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>
drivers/net/wireless/brcm80211/brcmsmac/aiutils.c