linux/drivers/staging
Michael Straube ef21bdc5b6 staging: r8188eu: refactor dump_chip_info()
Refactor the function dump_chip_info() to make the code cleaner and
reduce the driver object file size. Instead of using sprintf() to
print all the information to a buffer use a char pointer for the cut
version string and print the other strings directly by netdev_dbg().
For the unknown cut string we can use a smaller buffer and print to
that buffer with snprintf() to be safe.

These changes avoid the possible buffer overflow that the original
code had and reduces the driver object file size by 1029 bytes.

Suggested-by: Joe Perches <joe@perches.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220730150637.3550-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-16 15:14:19 +02:00
..
axis-fifo
board
clocking-wizard
emxx_udc
fbtft staging: fbtft: core: set smem_len before fb_deferred_io_init call 2022-07-28 10:42:42 +02:00
fieldbus
fwserial
gdm724x staging: gdm724x: drop unused CDC defines 2022-07-25 10:57:42 +02:00
greybus
iio
ks7010
media hantro: Remove incorrect HEVC SPS validation 2022-07-27 20:55:02 +02:00
most
nvec
octeon staging: switch to netif_napi_add_weight() 2022-07-08 14:28:21 +02:00
olpc_dcon
pi433 staging: pi433: fix wrong debug message on rf69_write_fifo() 2022-08-16 15:11:19 +02:00
qlge Staging driver patches for 6.0-rc1 2022-08-04 12:01:42 -07:00
r8188eu staging: r8188eu: refactor dump_chip_info() 2022-08-16 15:14:19 +02:00
rtl8192e Staging: rtl8192e: Added spaces around '+' 2022-07-08 14:25:46 +02:00
rtl8192u staging: rtl8192u: fix rmmod warn when device is renamed 2022-08-16 15:13:27 +02:00
rtl8712
rtl8723bs Staging driver patches for 6.0-rc1 2022-08-04 12:01:42 -07:00
rts5208
sm750fb
vc04_services staging: vchiq_arm: Add missing memory barrier comments 2022-06-27 13:50:19 +02:00
vme_user staging: vme_user: Fix checkpatch warnings in vme_tsi148.c 2022-08-16 15:11:48 +02:00
vt6655 staging: vt6655: Convert macro MACvDisableBarkerPreambleMd 2022-08-16 15:10:42 +02:00
vt6656 wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
wlan-ng Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-07-14 15:27:35 -07:00
Kconfig staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00
Makefile staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00