From: "Serge E. Hallyn" <serge@hallyn.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Tejun Heo <tj@kernel.org>,
"Serge E . Hallyn" <serge.hallyn@ubuntu.com>,
Li Zefan <lizefan@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Aditya Kali <adityakali@google.com>,
Aleksa Sarai <cyphar@cyphar.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cgroup: remove an unused variable
Date: Wed, 11 May 2016 09:26:11 -0500 [thread overview]
Message-ID: <20160511142611.GB18632@mail.hallyn.com> (raw)
In-Reply-To: <1462971450-728759-1-git-send-email-arnd@arndb.de>
Quoting Arnd Bergmann (arnd@arndb.de):
> The newly introduced cgroup_show_path has an extraneous variable
> that gcc warns about:
>
> kernel/cgroup.c: In function 'cgroup_show_path':
> kernel/cgroup.c:1634:15: error: unused variable 'ret' [-Werror=unused-variable]
> int len = 0, ret = 0;
>
> This must have been left over from a previous version that was
> changed before it got committed. I checked the function and
> found that two other variables in the same function have an
> extraneous initialization, presumably another artifact from
> the same rework.
>
> This patch removes the useless warning and the extra initializations.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, Arnd.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> ---
> kernel/cgroup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index afea39eb7649..29ead73d2536 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -1631,8 +1631,8 @@ static int rebind_subsystems(struct cgroup_root *dst_root, u16 ss_mask)
> static int cgroup_show_path(struct seq_file *sf, struct kernfs_node *kf_node,
> struct kernfs_root *kf_root)
> {
> - int len = 0, ret = 0;
> - char *buf = NULL;
> + int len;
> + char *buf;
> struct cgroup_root *kf_cgroot = cgroup_root_from_kf(kf_root);
> struct cgroup *ns_cgroup;
>
> --
> 2.7.0
prev parent reply other threads:[~2016-05-11 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 12:57 Arnd Bergmann
2016-05-11 14:26 ` Serge E. Hallyn [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=20160511142611.GB18632@mail.hallyn.com \
--to=serge@hallyn.com \
--cc=adityakali@google.com \
--cc=arnd@arndb.de \
--cc=cgroups@vger.kernel.org \
--cc=cyphar@cyphar.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=serge.hallyn@ubuntu.com \
--cc=tj@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
all inboxes | Powered by JetHome®