From: Johannes Berg <johannes@sipsolutions•net>
To: YUAN Linyu <Linyu.Yuan@alcatel-sbell•com.cn>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>
Subject: Re: [RFC v2] networking: convert many more places to skb_put_zero()
Date: Thu, 15 Jun 2017 13:58:07 +0200 [thread overview]
Message-ID: <1497527887.2518.6.camel@sipsolutions.net> (raw)
In-Reply-To: <8729016553E3654398EA69218DA29EEF15BC901A@cnshjmbx02>
On Thu, 2017-06-15 at 09:54 +0000, YUAN Linyu wrote:
> > -----Original Message-----
> > From: netdev-owner@vger•kernel.org [mailto:netdev-owner@vger•kernel
> > .org]
> > On Behalf Of Johannes Berg
> > Sent: Thursday, June 15, 2017 5:28 PM
> > To: netdev@vger•kernel.org
> > Cc: Johannes Berg
> > Subject: [RFC v2] networking: convert many more places to
> > skb_put_zero()
> >
> > From: Johannes Berg <johannes.berg@intel•com>
> > diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> > index ea2601501654..aaac2660aaf7 100644
> > --- a/net/sctp/sm_make_chunk.c
> > +++ b/net/sctp/sm_make_chunk.c
> > @@ -1478,10 +1478,9 @@ void *sctp_addto_chunk(struct sctp_chunk
> > *chunk,
> > int len, const void *data)
> > int chunklen = ntohs(chunk->chunk_hdr->length);
> > int padlen = SCTP_PAD4(chunklen) - chunklen;
> >
> > - padding = skb_put(chunk->skb, padlen);
> > + padding = skb_put_zero(chunk->skb, padlen);
>
> "padding" will become unused.
> I know this place when I check.
Yeah, I figured that would happen. I could try to make the spatch catch
that too, but I'm not sure I can figure out how to :)
johannes
next prev parent reply other threads:[~2017-06-15 11:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 9:28 [RFC v2] networking: convert many more places to skb_put_zero() Johannes Berg
2017-06-15 9:54 ` YUAN Linyu
2017-06-15 11:58 ` Johannes Berg [this message]
2017-06-15 18:36 ` David Miller
2017-06-15 19:26 ` Johannes Berg
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=1497527887.2518.6.camel@sipsolutions.net \
--to=johannes@sipsolutions$(echo .)net \
--cc=Linyu.Yuan@alcatel-sbell$(echo .)com.cn \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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