Re: [PATCH v6 1/5] staging: rtl8723bs: introduce kmemdup() where applicable

From: Andy Shevchenko

Date: Wed Feb 04 2026 - 08:29:27 EST


On Wed, Feb 04, 2026 at 10:13:43PM +0900, Minu Jin wrote:
> 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.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko