Re: [PATCH v4 3/4] staging: rtl8723bs: replace skb allocation, copy wrappers

From: Andy Shevchenko

Date: Tue Feb 03 2026 - 10:13:39 EST


On Sun, Feb 01, 2026 at 04:30:00AM +0900, Minu Jin wrote:
> Replace the wrapper functions rtw_skb_alloc() and rtw_skb_copy() with
> kernel APIs __dev_alloc_skb() and skb_copy().
>
> I used GFP_ATOMIC for the network data paths because these
> functions are called in contexts where the driver cannot sleep.

...

> - precvbuf->pskb = rtw_skb_alloc(MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
> + precvbuf->pskb = __dev_alloc_skb(MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ, GFP_ATOMIC);

>

Drop this blank line for the consistency's sake (other cases use no blank line style).

> if (precvbuf->pskb) {
> precvbuf->pskb->dev = padapter->pnetdev;

...

> - newskb = rtw_skb_copy(skb);
> + newskb = skb_copy(skb, GFP_ATOMIC);
>

Ditto.

> if (newskb) {
> memcpy(newskb->data, psta->hwaddr, 6);

--
With Best Regards,
Andy Shevchenko