lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 11 May 2016 09:26:11 -0500
From:	"Serge E. Hallyn" <serge@...lyn.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Tejun Heo <tj@...nel.org>,
	"Serge E . Hallyn" <serge.hallyn@...ntu.com>,
	Li Zefan <lizefan@...wei.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Aditya Kali <adityakali@...gle.com>,
	Aleksa Sarai <cyphar@...har.com>, cgroups@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cgroup: remove an unused variable

Quoting Arnd Bergmann (arnd@...db.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@...db.de>

Thanks, Arnd.

Acked-by: Serge Hallyn <serge.hallyn@...onical.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ