linux-stable/net/wireless
Arnd Bergmann 95f5057bb1 wireless: wext: avoid gcc -O3 warning
[ Upstream commit e16119655c ]

After the introduction of CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3,
the wext code produces a bogus warning:

In function 'iw_handler_get_iwstats',
    inlined from 'ioctl_standard_call' at net/wireless/wext-core.c:1015:9,
    inlined from 'wireless_process_ioctl' at net/wireless/wext-core.c:935:10,
    inlined from 'wext_ioctl_dispatch.part.8' at net/wireless/wext-core.c:986:8,
    inlined from 'wext_handle_ioctl':
net/wireless/wext-core.c:671:3: error: argument 1 null where non-null expected [-Werror=nonnull]
   memcpy(extra, stats, sizeof(struct iw_statistics));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/string.h:5,
net/wireless/wext-core.c: In function 'wext_handle_ioctl':
arch/x86/include/asm/string_64.h:14:14: note: in a call to function 'memcpy' declared here

The problem is that ioctl_standard_call() sometimes calls the handler
with a NULL argument that would cause a problem for iw_handler_get_iwstats.
However, iw_handler_get_iwstats never actually gets called that way.

Marking that function as noinline avoids the warning and leads
to slightly smaller object code as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200107200741.3588770-1-arnd@arndb.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-05 14:18:22 +00:00
..
.gitignore
ap.c cfg80211: call disconnect_wk when AP stops 2019-12-01 09:14:15 +01:00
chan.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
core.c cfg80211: fix memory leak of wiphy device name 2019-06-25 11:36:54 +08:00
core.h cfg80211: call disconnect_wk when AP stops 2019-12-01 09:14:15 +01:00
db.txt
debugfs.c
debugfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ethtool.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
genregdb.awk
ibss.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig
lib80211.c
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mesh.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mlme.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nl80211.c nl80211: Fix a GET_KEY reply attribute 2019-11-24 08:22:56 +01:00
nl80211.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ocb.c
of.c
radiotap.c
rdev-ops.h cfg80211: Fix radar event during another phy CAC 2020-02-05 14:18:21 +00:00
reg.c cfg80211: Fix radar event during another phy CAC 2020-02-05 14:18:21 +00:00
reg.h cfg80211: Share Channel DFS state across wiphys of same DFS domain 2017-03-06 13:54:20 +01:00
regdb.h
scan.c cfg80211: add and use strongly typed element iteration macros 2019-10-11 18:18:48 +02:00
sme.c cfg80211: call disconnect_wk when AP stops 2019-12-01 09:14:15 +01:00
sysfs.c cfg80211: check rdev resume callback only for registered wiphy 2017-03-29 09:11:29 +02:00
sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c
trace.h cfg80211: Fix radar event during another phy CAC 2020-02-05 14:18:21 +00:00
util.c cfg80211: fix page refcount issue in A-MSDU decap 2020-01-23 08:20:33 +01:00
wext-compat.c cfg80211: initialize on-stack chandefs 2019-10-11 18:18:37 +02:00
wext-compat.h
wext-core.c wireless: wext: avoid gcc -O3 warning 2020-02-05 14:18:22 +00:00
wext-priv.c
wext-proc.c
wext-sme.c cfg80211: wext: avoid copying malformed SSIDs 2019-10-29 09:17:34 +01:00
wext-spy.c