Re: [PATCH v2] staging: rtl8723bs: Remove wrapper functions in osdep_service

From: Greg KH

Date: Tue Jan 27 2026 - 09:54:10 EST


On Sun, Jan 25, 2026 at 12:41:45AM +0900, Minu Jin wrote:
> Remove unnecessary wrapper functions _rtw_malloc, _rtw_zmalloc,
> _rtw_skb_alloc, and _rtw_skb_copy from osdep_service.c.

Please do these one at a time, as doing this all at once is impossible
to review and verify.

> These wrappers were using 'in_interrupt()' to determine allocation flags,
> which is unreliable and discouraged.
>
> Callers have been updated to use standard kernel functions directly:
> - _rtw_malloc() -> kmalloc()
> - _rtw_zmalloc() -> kzalloc()
> - _rtw_skb_alloc() -> __dev_alloc_skb()
> - _rtw_skb_copy() -> skb_copy()
>
> All call sites have been manually reviewed and converted to kzalloc, kmalloc.
> The GFP flags were chosen based on the calling context:
> - GFP_ATOMIC is used for atomic contexts. (irq handler, holding
> spinlock)
> - GFP_KERNEL is used for initialization, configuration, and command paths.

How did you validate the calling contexts?

thanks,

greg k-h