All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: lusture: obdclass: Remove unnecessary NULL check
@ 2016-02-18 15:25 ` Bhaktipriya Shridhar
  0 siblings, 0 replies; 4+ messages in thread
From: Bhaktipriya Shridhar @ 2016-02-18 15:25 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman, Dmitry Eremin,
	Bhumika Goyal, Julia Lawall, Cihangir Akturk, Joe Perches
  Cc: lustre-devel, devel, linux-kernel

NULL check before the  debugfs_remove_recursive function is not needed.

This was detected using scripts/coccinelle/free/ifnullfree.cocci

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 1913f3e..2045621 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -454,8 +454,7 @@ out:

 int class_procfs_clean(void)
 {
-	if (debugfs_lustre_root != NULL)
-		debugfs_remove_recursive(debugfs_lustre_root);
+	debugfs_remove_recursive(debugfs_lustre_root);

 	debugfs_lustre_root = NULL;

--
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [lustre-devel] [PATCH] staging: lusture: obdclass: Remove unnecessary NULL check
@ 2016-02-18 15:25 ` Bhaktipriya Shridhar
  0 siblings, 0 replies; 4+ messages in thread
From: Bhaktipriya Shridhar @ 2016-02-18 15:25 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman, Dmitry Eremin,
	Bhumika Goyal, Julia Lawall, Cihangir Akturk, Joe Perches
  Cc: lustre-devel, devel, linux-kernel

NULL check before the  debugfs_remove_recursive function is not needed.

This was detected using scripts/coccinelle/free/ifnullfree.cocci

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 1913f3e..2045621 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -454,8 +454,7 @@ out:

 int class_procfs_clean(void)
 {
-	if (debugfs_lustre_root != NULL)
-		debugfs_remove_recursive(debugfs_lustre_root);
+	debugfs_remove_recursive(debugfs_lustre_root);

 	debugfs_lustre_root = NULL;

--
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: lusture: obdclass: Remove unnecessary NULL check
  2016-02-18 15:25 ` [lustre-devel] " Bhaktipriya Shridhar
@ 2016-02-20 23:34   ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-02-20 23:34 UTC (permalink / raw)
  To: Bhaktipriya Shridhar
  Cc: Oleg Drokin, Andreas Dilger, Dmitry Eremin, Bhumika Goyal,
	Julia Lawall, Cihangir Akturk, Joe Perches, devel, linux-kernel,
	lustre-devel

On Thu, Feb 18, 2016 at 08:55:39PM +0530, Bhaktipriya Shridhar wrote:
> NULL check before the  debugfs_remove_recursive function is not needed.
> 
> This was detected using scripts/coccinelle/free/ifnullfree.cocci
> 
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
> ---
>  drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)


Doesn't apply to my tree :(

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [lustre-devel] [PATCH] staging: lusture: obdclass: Remove unnecessary NULL check
@ 2016-02-20 23:34   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-02-20 23:34 UTC (permalink / raw)
  To: Bhaktipriya Shridhar
  Cc: Oleg Drokin, Andreas Dilger, Dmitry Eremin, Bhumika Goyal,
	Julia Lawall, Cihangir Akturk, Joe Perches, devel, linux-kernel,
	lustre-devel

On Thu, Feb 18, 2016 at 08:55:39PM +0530, Bhaktipriya Shridhar wrote:
> NULL check before the  debugfs_remove_recursive function is not needed.
> 
> This was detected using scripts/coccinelle/free/ifnullfree.cocci
> 
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
> ---
>  drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)


Doesn't apply to my tree :(

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-20 23:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 15:25 [PATCH] staging: lusture: obdclass: Remove unnecessary NULL check Bhaktipriya Shridhar
2016-02-18 15:25 ` [lustre-devel] " Bhaktipriya Shridhar
2016-02-20 23:34 ` Greg Kroah-Hartman
2016-02-20 23:34   ` [lustre-devel] " Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.