]> git.ipfire.org Git - thirdparty/linux.git/commit
staging: rtl8723bs: introduce kmemdup() where applicable
authorMinu Jin <s9430939@naver.com>
Wed, 4 Feb 2026 13:13:43 +0000 (22:13 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Feb 2026 13:35:26 +0000 (14:35 +0100)
commit5ed9ef2703adafbbc02258de76c07fa604a354de
tree069c6d63db7b2459a0ed3cb9eafdf538bc0f9bae
parentab67d4c6d5d33f408df9a43d0fa94f54a32995a8
staging: rtl8723bs: introduce kmemdup() where applicable

Replace memory allocation followed by memcpy() with kmemdup() to simplify
the code and improve readability.

About GFP Flags:
- GFP_ATOMIC is used for allocations in atomic contexts such as
  spinlock-protected sections, tasklets, and timer handlers.
- GFP_KERNEL is used for process contexts where sleeping is allowed.

Specifically, in OnAssocReq(), GFP_ATOMIC is used because
the allocation is performed while holding a spin lock.

Signed-off-by: Minu Jin <s9430939@naver.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20260204131347.3515949-2-s9430939@naver.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_ap.c
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
drivers/staging/rtl8723bs/os_dep/osdep_service.c