public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Nam Cao <namcaov@gmail.com>
To: philipp hortmann <philipp.g.hortmann@gmail.com>
Cc: Shang XiaoJing <shangxiaojing@huawei.com>,
	gregkh@linuxfoundation.org, wjsota@gmail.com,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH -next] staging: rtl8192e: cmdpkt: Use skb_put_data() instead of skb_put/memcpy pair
Date: Tue, 27 Sep 2022 20:55:06 +0200	[thread overview]
Message-ID: <20220927185506.GA32477@nam-dell> (raw)
In-Reply-To: <20220927183110.GA16965@matrix-ESPRIMO-P710>

On Tue, Sep 27, 2022 at 08:31:10PM +0200, philipp hortmann wrote:
> Tue, Sep 27, 2022 at 10:42:20AM +0800, Shang XiaoJing wrote:
> > Use skb_put_data() instead of skb_put() and memcpy(), which is shorter
> > and clear.
> > 
> > Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
> > ---
> >  drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
> > index cd8bbc358d01..57b4c8433e8e 100644
> > --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
> > +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
> > @@ -61,8 +61,7 @@ bool rtl92e_send_cmd_pkt(struct net_device *dev, u32 type, const void *data,
> >  			tcb_desc->txbuf_size = frag_length;
> >  		}
> >  
> > -		seg_ptr = skb_put(skb, frag_length);
> > -		memcpy(seg_ptr, data, (u32)frag_length);
> > +		skb_put_data(skb, data, frag_length);
> >  
> >  		if (type == DESC_PACKET_TYPE_INIT &&
> >  		    (!priv->rtllib->check_nic_enough_desc(dev, TXCMD_QUEUE) ||
> > -- 
> > 2.17.1
> >
> Applying: staging: rtl8192e: cmdpkt: Use skb_put_data() instead of skb_put/memcpy pair
> error: patch failed: drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c:61
> error: drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c: patch does not apply
> Patch failed at 0001 staging: rtl8192e: cmdpkt: Use skb_put_data() instead of skb_put/memcpy pair
> 
> Sorry 
> Bye Philipp

I think this patch has already been applied to staging-testing..

Best regards,
Nam

      reply	other threads:[~2022-09-27 18:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27  2:42 [PATCH -next] staging: rtl8192e: cmdpkt: Use skb_put_data() instead of skb_put/memcpy pair Shang XiaoJing
2022-09-27 18:31 ` philipp hortmann
2022-09-27 18:55   ` Nam Cao [this message]

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=20220927185506.GA32477@nam-dell \
    --to=namcaov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=philipp.g.hortmann@gmail.com \
    --cc=shangxiaojing@huawei.com \
    --cc=wjsota@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