From: Minu Jin <s9430939@naver.com>
To: gregkh@linuxfoundation.org
Cc: andy@kernel.org, dan.carpenter@linaro.org, trohan2000@gmail.com,
straube.linux@gmail.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Minu Jin <s9430939@naver.com>
Subject: [PATCH v5 0/5] staging: rtl8723bs: replace custom wrappers with kernel APIs
Date: Wed, 4 Feb 2026 15:44:49 +0900 [thread overview]
Message-ID: <20260204064455.1379342-1-s9430939@naver.com> (raw)
This series replaces redundant custom wrapper functions (rtw_malloc(),
rtw_zmalloc(), rtw_skb_alloc(), etc.) with standard kernel APIs (kmalloc(),
kzalloc(), kmemdup(), skb_copy(), __dev_alloc_skb()).
The original wrappers relied on an internal in_interrupt() check to
select GFP flags. I have analyzed all call sites and replaced them with
explicit GFP_KERNEL or GFP_ATOMIC flags based on the context.
Changes in v5:
(suggested by Andy Shevchenko)
- Completely restructured the patch series.
- Use kmemdup() where applicable (replacing kmalloc + memcpy patterns).
- Used kzalloc() for allocations followed by manual zero-initialization.
- Used array_size() and size_add() for overflow-safe allocations.
- Updated error return codes from -1 to -ENOMEM where appropriate.
Changes in v4
(suggested by Andy Shevchenko)
- Use kmemdup() where applicable.
- Use array_size(), size_add() for overflow safe allocations.
- Use sizeof(*ptr) instead of sizeof(struct val) for
better maintainability.
Changes in v3
- I have analyzed each call site to apply the appropriate GFP flags
based on the execution context.
- Improved the logical separation of patches to maintain git bisect
- Removed redundant definitions and unused macros (e.g., rtw_skb_alloc_f)
in the final cleanup patch.
Minu Jin (5):
staging: rtl8723bs: introduce kmemdup() where applicable
staging: rtl8723bs: replace rtw_malloc() with kmalloc()
staging: rtl8723bs: replace rtw_zmalloc() with kzalloc()
staging: rtl8723bs: use standard skb allocation APIs
staging: rtl8723bs: remove unused allocation wrapper functions
drivers/staging/rtl8723bs/core/rtw_ap.c | 22 ++---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 83 +++++++++----------
drivers/staging/rtl8723bs/core/rtw_mlme.c | 13 ++-
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 41 +++++----
drivers/staging/rtl8723bs/core/rtw_recv.c | 4 +-
drivers/staging/rtl8723bs/core/rtw_security.c | 3 +-
.../staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 +-
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 +-
.../staging/rtl8723bs/hal/rtl8723bs_recv.c | 11 +--
drivers/staging/rtl8723bs/hal/sdio_ops.c | 28 +++----
.../staging/rtl8723bs/include/osdep_service.h | 11 ---
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 27 +++---
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +-
.../staging/rtl8723bs/os_dep/osdep_service.c | 40 +--------
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 5 +-
16 files changed, 120 insertions(+), 184 deletions(-)
--
2.43.0
next reply other threads:[~2026-02-04 6:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 6:44 Minu Jin [this message]
2026-02-04 6:44 ` [PATCH v5 1/5] staging: rtl8723bs: introduce kmemdup() where applicable Minu Jin
2026-02-04 10:16 ` Andy Shevchenko
2026-02-04 6:44 ` [PATCH v5 2/5] staging: rtl8723bs: replace rtw_malloc() with kmalloc() Minu Jin
2026-02-04 10:21 ` Andy Shevchenko
2026-02-04 6:44 ` [PATCH v5 3/5] staging: rtl8723bs: replace rtw_zmalloc() with kzalloc() Minu Jin
2026-02-04 10:27 ` Andy Shevchenko
2026-02-04 6:44 ` [PATCH v5 4/5] staging: rtl8723bs: use standard skb allocation APIs Minu Jin
2026-02-04 10:28 ` Andy Shevchenko
2026-02-04 6:44 ` [PATCH v5 5/5] staging: rtl8723bs: remove unused allocation wrapper functions Minu Jin
2026-02-04 10:29 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260204064455.1379342-1-s9430939@naver.com \
--to=s9430939@naver.com \
--cc=andy@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.com \
--cc=trohan2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®