[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-driver-devel
Subject:    Re: [PATCH] staging:r8723bs: remove wrappers around skb_clone()
From:       Ivan Safonov <insafonov () gmail ! com>
Date:       2020-05-31 17:49:22
Message-ID: 1803e5d8-2629-adf3-6638-0ad843273a02 () gmail ! com
[Download RAW message or body]

On 5/31/20 8:36 PM, Joe Perches wrote:
> On Sun, 2020-05-31 at 20:28 +0300, Ivan Safonov wrote:
> > On 5/31/20 7:15 PM, Joe Perches wrote:
> > > On Sun, 2020-05-31 at 19:08 +0300, Ivan Safonov wrote:
> > > > Wrappers around skb_clone() do not simplify the driver code.
> > > []
> > > > -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb)
> > > > -{
> > > > -	return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
> > > > -}
> > > > -
> > > []
> > > > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c \
> > > > b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
> > > []
> > > > @@ -110,7 +110,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, \
> > > > _pkt *pkt, struct rx_pkt  if (memcmp(pattrib->dst, \
> > > > myid(&padapter->eeprompriv), ETH_ALEN)) {  if (bmcast) {
> > > > 					psta = rtw_get_bcmc_stainfo(padapter);
> > > > -					pskb2 = rtw_skb_clone(pkt);
> > > > +					pskb2 = skb_clone(pkt, GFP_ATOMIC);
> > > 
> > > Why make every clone allocation GFP_ATOMIC ?
> > 
> > The rtw_os_recv_indicate_pkt() is always called from an interrupt handler.
> 
> It'd be better to indicate you know that in the changelog
> as the subject and changelog just shows removing wrappers
> and the patch code does not agree with that.

Yes, it's right.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic