linux-stable/drivers/staging
Arnd Bergmann 14b6cff54e staging: rtl8723bs: avoid bogus gcc warning
gcc gets confused by some of the type casts and produces an
apparently senseless warning about an out-of-bound memcpy to
an unrelated array in the same structure:

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function 'rtw_cfg80211_ap_set_encryption':
cc1: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
In file included from drivers/staging/rtl8723bs/include/drv_types.h:32,
                 from drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:10:
drivers/staging/rtl8723bs/include/rtw_security.h:98:15: note: at offset [184, 4264] into destination object 'dot11AuthAlgrthm' of size 4
   98 |         u32   dot11AuthAlgrthm;         /*  802.11 auth, could be open, shared, 8021x and authswitch */
      |               ^~~~~~~~~~~~~~~~
cc1: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
drivers/staging/rtl8723bs/include/rtw_security.h:98:15: note: at offset [264, 4344] into destination object 'dot11AuthAlgrthm' of size 4

This is a known gcc bug, and the patch here is only a workaround,
but the approach of using a temporary variable to hold a pointer
to the key also improves readability in addition to avoiding the
warning, so overall this should still help.

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99673
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210422152648.2891996-1-arnd@kernel.org
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:26:24 +02:00
..
android staging: android: Remove filename reference from file 2021-03-10 09:25:28 +01:00
axis-fifo staging: axis-fifo: remove redundant dev_err call 2021-04-08 09:24:05 +02:00
board
clocking-wizard staging: clocking-wizard: Remove the hardcoding of the clock outputs 2021-03-10 09:25:30 +01:00
emxx_udc staging: emxx_udc: remove unused variable driver_desc 2021-03-10 09:25:25 +01:00
fbtft staging: fbtft: convert sysfs snprintf to sysfs_emit 2021-04-05 12:15:15 +02:00
fieldbus staging: fieldbus: simplify devm_anybuss_host_common_probe 2021-04-13 09:53:41 +02:00
fwserial TTY/Serial driver updates for 5.13-rc1 2021-04-26 11:20:10 -07:00
gdm724x tty: make everyone's write_room return >= 0 2021-03-10 09:34:09 +01:00
greybus spi: Updates for v5.13 2021-04-26 16:32:11 -07:00
gs_fpgaboot
hikey9xx regulator: hi6421v600-regulator: move it from staging 2021-04-02 15:11:17 +02:00
iio iio:cdc:ad7150: Move driver out of staging. 2021-04-07 08:36:37 +01:00
kpc2000 staging: kpc2000: pcie.h: Remove extra blank line 2021-04-06 12:55:24 +02:00
ks7010
media drm tegra-next + fixes for 5.13-rc1 2021-04-30 12:44:02 -07:00
most drivers: most: add ALSA sound driver 2021-03-23 10:03:13 +01:00
mt7621-dma
mt7621-dts staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk' 2021-04-12 19:10:54 -07:00
mt7621-pci staging: mt7621-pci: stop using of_pci_range_to_resource 2021-04-11 08:43:48 +02:00
netlogic drivers: staging: netlogic: fix unmet dependency for PHYLIB 2021-03-26 15:06:15 +01:00
nvec staging/nvec:: avoid Wempty-body warning 2021-03-22 17:05:15 +01:00
octeon Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
octeon-usb staging: octeon-usb: Match alignment with open parenthesis 2021-03-18 10:20:33 +01:00
olpc_dcon
pi433
qlge staging: qlge: deal with the case that devlink_health_reporter_create fails 2021-03-26 14:58:13 +01:00
ralink-gdma staging: ralink-gdma: Add missing MODULE_DEVICE_TABLE 2021-04-10 10:29:25 +02:00
rtl8188eu staging: rtl8188eu: remove unused function parameters 2021-04-22 10:42:23 +02:00
rtl8192e staging: rtl8192e: indent statement properly 2021-04-22 10:38:42 +02:00
rtl8192u Staging: rtl8192u: ieee80211: remove odd backslash. 2021-04-12 11:37:47 +02:00
rtl8712 staging: rtl8712: fix wrong function output 2021-04-09 16:16:10 +02:00
rtl8723bs staging: rtl8723bs: avoid bogus gcc warning 2021-05-10 14:26:24 +02:00
rts5208 staging: rts5208: remove unnecessary ftrace-like logging 2021-04-12 11:40:13 +02:00
sm750fb staging: sm750fb: Remove unnecessary blank line 2021-04-05 12:12:13 +02:00
unisys staging: unisys: visornic: Fix repeated words in comments 2021-03-10 09:25:33 +01:00
vc04_services ARM: SoC drivers for v5.13 2021-04-26 12:11:52 -07:00
vme
vt6655 Merge v5.12-rc4 into staging-next 2021-03-22 08:55:27 +01:00
vt6656 staging: vt6656: Fix alignment of function args 2021-03-10 09:25:25 +01:00
wfx Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
wlan-ng staging: wlan-ng: Remove unused function pointer typedef freebuf_method_t 2021-03-10 09:25:24 +01:00
Kconfig Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
Makefile Networking changes for 5.13. 2021-04-29 11:57:23 -07:00