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] [thread-next>] [day] [month] [year] [list]
Message-Id: <b277b33b-bcc0-c1c5-52d6-9e1580531df3@linux.ibm.com>
Date:   Wed, 23 Jan 2019 14:22:33 +0100
From:   Peter Oberparleiter <oberpar@...ux.ibm.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gcov: no need to check return value of debugfs_create
 functions

On 22.01.2019 16:21, Greg Kroah-Hartman wrote:
> When calling debugfs functions, there is no need to ever check the
> return value.  The function can work or not, but the code logic should
> never do something different based on this.
> 
> Also delete the dentry variable as it is never needed.
> 
> Cc: Peter Oberparleiter <oberpar@...ux.ibm.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
>  kernel/gcov/fs.c | 22 ++--------------------
>  1 file changed, 2 insertions(+), 20 deletions(-)

Acked-by: Peter Oberparleiter <oberpar@...ux.ibm.com>

Compile test was successful, but the patch introduces a compile warning.
Could you merge the attached patch?

8<===
From: Peter Oberparleiter <oberpar@...ux.vnet.ibm.com>
Subject: [PATCH] gcov: Fix compiler warning

Fix compiler warning when compiling with CONFIG_GCOV_KERNEL=y:

  CC      kernel/gcov/fs.o
kernel/gcov/fs.c: In function ‘gcov_fs_init’:
kernel/gcov/fs.c:756:6: warning: unused variable ‘rc’ [-Wunused-variable]
  int rc = -EIO;
      ^~

Signed-off-by: Peter Oberparleiter <oberpar@...ux.vnet.ibm.com>
---
 kernel/gcov/fs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c
index aa9a49f72024..e5eb5ea7ea59 100644
--- a/kernel/gcov/fs.c
+++ b/kernel/gcov/fs.c
@@ -753,8 +753,6 @@ void gcov_event(enum gcov_action action, struct gcov_info *info)
 /* Create debugfs entries. */
 static __init int gcov_fs_init(void)
 {
-	int rc = -EIO;
-
 	init_node(&root_node, NULL, NULL, NULL);
 	/*
 	 * /sys/kernel/debug/gcov will be parent for the reset control file
-- 
2.17.0

-- 
Peter Oberparleiter
Linux on Z Development - IBM Germany

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ