netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: "Björn Töpel" <bjorn.topel@intel.com>
Cc: Colin King <colin.king@canonical.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	netdev@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][net-next] xdp: remove redundant variable 'headroom'
Date: Thu, 30 Aug 2018 19:50:15 -0700	[thread overview]
Message-ID: <20180831025013.yiukmlw6o7gedevg@ast-mbp> (raw)
In-Reply-To: <ec579a7c-345b-f462-95ac-f36de1072614@intel.com>

On Thu, Aug 30, 2018 at 04:37:50PM +0200, Björn Töpel wrote:
> On 2018-08-30 16:27, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > Variable 'headroom' is being assigned but is never used hence it is
> > redundant and can be removed.
> > 
> > Cleans up clang warning:
> > variable ‘headroom’ set but not used [-Wunused-but-set-variable]
> > 
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> >   net/core/xdp.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/net/core/xdp.c b/net/core/xdp.c
> > index 654dbb19707e..4b2b194f4f1f 100644
> > --- a/net/core/xdp.c
> > +++ b/net/core/xdp.c
> > @@ -412,7 +412,7 @@ EXPORT_SYMBOL_GPL(xdp_attachment_setup);
> >   struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp)
> >   {
> > -	unsigned int metasize, headroom, totsize;
> > +	unsigned int metasize, totsize;
> >   	void *addr, *data_to_copy;
> >   	struct xdp_frame *xdpf;
> >   	struct page *page;
> > @@ -420,7 +420,6 @@ struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp)
> >   	/* Clone into a MEM_TYPE_PAGE_ORDER0 xdp_frame. */
> >   	metasize = xdp_data_meta_unsupported(xdp) ? 0 :
> >   		   xdp->data - xdp->data_meta;
> > -	headroom = xdp->data - xdp->data_hard_start;
> >   	totsize = xdp->data_end - xdp->data + metasize;
> >   	if (sizeof(*xdpf) + totsize > PAGE_SIZE)
> > 
> 
> This should go via bpf-next. Thanks for the fix!
> 
> Acked-by: Björn Töpel <bjorn.topel@intel.com>

Applied, Thanks

      reply	other threads:[~2018-08-31  6:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30 14:27 [PATCH][net-next] xdp: remove redundant variable 'headroom' Colin King
2018-08-30 14:37 ` Björn Töpel
2018-08-31  2:50   ` Alexei Starovoitov [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=20180831025013.yiukmlw6o7gedevg@ast-mbp \
    --to=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@intel.com \
    --cc=brouer@redhat.com \
    --cc=colin.king@canonical.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).