From: Joe Perches <joe@perches.com>
To: Nick Warne <nick@linicks.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Alexey Kodanev <alexey.kodanev@oracle.com>
Subject: Re: [PATCH] net/core/sysctl_net_core.c unused variable
Date: Sun, 06 Sep 2015 08:51:54 -0700 [thread overview]
Message-ID: <1441554714.28194.49.camel@perches.com> (raw)
In-Reply-To: <55EC5D6B.3030402@linicks.net>
On Sun, 2015-09-06 at 16:36 +0100, Nick Warne wrote:
> On 06/09/15 16:28, Joe Perches wrote:
> > On Sun, 2015-09-06 at 16:16 +0100, Nick Warne wrote:
> >> On 06/09/15 15:52, Joe Perches wrote:
> >> > On Sun, 2015-09-06 at 15:13 +0100, Nick Warne wrote:
> >> >> gcc version 4.8.2 (GCC) warns that 'static int one = 1;' is declared but
> >> >> not used in file net/core/sysctl_net_core.c.
> >> >
> >> > Only when CONFIG_NET isn't set.
> >>
> >> CONFIG_NET=y
> >>
> >> Peculiar indeed.
> >>
> >> >> Reading the file, that is
> >> >> the case. Attached is a patch to remove it.
> >> >
> >> > $ git grep -w -n one net/core/sysctl_net_core.c
> >> > net/core/sysctl_net_core.c:26:static int one = 1;
> >> > net/core/sysctl_net_core.c:332: .extra2 = &one
> >> >
> >> >> Signed-off-by: Nick Warne <nick@linicks.net>
> >> >
> >> > Please use grep to augment reading.
> >>
> >> grep -w -n one net/core/sysctl_net_core.c
> >> 26:static int one = 1;
> >>
> >> ?
> >>
> >> I just don't have the &one.
> >>
> >> I am confused now.
> >
> > What source tree are you using?
>
> Latest longterm 3.18.21
OK, it's important to mention that otherwise the
assumption would be a git tree like net or net-next.
> > What changes in what branch exist?
>
> I am not using git (if that is what you mean by 'branches') - just
> tarballs from kernel.org
(OK, using git and linux-stable)
$ git grep -w -n one v3.18.21 -- net/core/sysctl_net_core.c
v3.18.21:net/core/sysctl_net_core.c:26:static int one = 1;
And the responsible commit:
commit c48cf4f27d4555a455c3fef71137bd0fc44d1656
("net: sysctl_net_core: check SNDBUF and RCVBUF for min length")
next prev parent reply other threads:[~2015-09-06 15:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-06 14:13 [PATCH] net/core/sysctl_net_core.c unused variable Nick Warne
2015-09-06 14:52 ` Joe Perches
2015-09-06 15:16 ` Nick Warne
[not found] ` <1441553310.28194.44.camel@perches.com>
2015-09-06 15:36 ` Nick Warne
2015-09-06 15:51 ` Joe Perches [this message]
2015-09-06 16:08 ` Nick Warne
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=1441554714.28194.49.camel@perches.com \
--to=joe@perches.com \
--cc=alexey.kodanev@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nick@linicks.net \
/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