linux-stable/drivers/staging
Arnd Bergmann aa3233ea7b staging: r8188eu: fix -Wrestrict warnings
Adding back the nonstandard ioctl commands caused -Wrestrict warnings
when building with 'make W=1':

drivers/staging/r8188eu/os_dep/ioctl_linux.c: In function 'rtw_mp_read_rf':
drivers/staging/r8188eu/os_dep/ioctl_linux.c:5515:27: error: 'sprintf' argument 3 overlaps destination object 'extra' [-Werror=restrict]
 5515 |                           sprintf(extra, "%s %d", extra, strtou);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/r8188eu/os_dep/ioctl_linux.c:5470:54: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
 5470 |                         struct iw_point *wrqu, char *extra)
      |                                                ~~~~~~^~~~~

Change these to the same construct used elsewhere in that driver,
with an offset to the string to make the warning go away.

The ioctl commands were previously removed, and it's unlikely that
anything is actually using them, so ideally I would prefer to have
them removed again.

The lack of range checking of the 'extra' output buffer is also
slightly worrying, but I did not check whether this could cause
harm.

Fixes: 2b42bd58b3 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210920095525.1150678-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20 12:33:22 +02:00
..
android
axis-fifo
board
clocking-wizard clk: staging: correct reference to config IOMEM to config HAS_IOMEM 2021-08-17 20:03:00 +02:00
emxx_udc
fbtft staging/fbtft: Fix braces coding style 2021-08-05 13:05:57 +02:00
fieldbus
fwserial
gdm724x TTY / Serial patches for 5.15-rc1 2021-09-01 09:51:16 -07:00
greybus staging: greybus: uart: fix tty use after free 2021-09-14 09:18:18 +02:00
gs_fpgaboot
iio
ks7010
media Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
most
mt7621-dma
mt7621-dts
mt7621-pci staging: mt7621-pci: fix hang when nothing is connected to pcie ports 2021-08-26 12:06:37 +02:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
qlge IIO / Staging driver update for 5.15-rc1 2021-09-01 09:45:57 -07:00
r8188eu staging: r8188eu: fix -Wrestrict warnings 2021-09-20 12:33:22 +02:00
ralink-gdma
rtl8192e staging: rtl8192e: rtl_core: Fix possible null-pointer dereference in _rtl92e_pci_disconnect() 2021-08-11 09:43:44 +02:00
rtl8192u staging/rtl8192u: Prefer kcalloc over open coded arithmetic 2021-08-26 12:14:27 +02:00
rtl8712 Merge 5.14-rc5 into staging-next 2021-08-09 08:59:23 +02:00
rtl8723bs staging: rtl8723bs: remove header file ethernet.h 2021-08-26 12:14:57 +02:00
rts5208 staging: rts5208: Fix get_ms_information() heap buffer size 2021-08-18 10:10:49 +02:00
sm750fb staging: sm750fb: Rename vScreen to v_screen in lynxfb_crtc 2021-07-28 20:17:26 +02:00
unisys
vc04_services staging: vchiq: Add details to Kconfig help texts 2021-08-10 12:08:46 +02:00
vme
vt6655 staging: vt6655: Remove filenames in files 2021-08-28 09:45:10 +02:00
vt6656 staging: vt6656: Remove filenames in files 2021-08-28 08:33:33 +02:00
wfx
wlan-ng IIO / Staging driver update for 5.15-rc1 2021-09-01 09:45:57 -07:00
Kconfig staging: rtl8188eu: remove rtl8188eu driver from staging dir 2021-08-01 08:10:42 +02:00
Makefile staging: rtl8188eu: remove rtl8188eu driver from staging dir 2021-08-01 08:10:42 +02:00