linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci: hotplug: This patch removes unnecessary return statement using spatch tool
@ 2016-12-24  7:33 Rahul Krishnan
  2016-12-24  7:49 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Krishnan @ 2016-12-24  7:33 UTC (permalink / raw)
  To: bhelgaas
  Cc: mpe, mika.westerberg, gwshan, mayurkumar.patel, keith.busch,
	julia.lawall, linux-pci, linux-kernel

This patch removes unnecessary return statement using spatch tool

Signed-off-by: Rahul Krishnan <mrahul.krishnan@gmail.com>
---
 drivers/pci/hotplug/rpadlpar_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index dc67f39..9d0e2e1 100644
--- a/drivers/pci/hotplug/rpadlpar_core.c
+++ b/drivers/pci/hotplug/rpadlpar_core.c
@@ -463,8 +463,7 @@ int __init rpadlpar_io_init(void)
 		return -EPERM;
 	}
 
-	rc = dlpar_sysfs_init();
-	return rc;
+	return dlpar_sysfs_init();
 }
 
 void rpadlpar_io_exit(void)
-- 
2.7.4

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

* Re: [PATCH] pci: hotplug: This patch removes unnecessary return statement using spatch tool
  2016-12-24  7:33 [PATCH] pci: hotplug: This patch removes unnecessary return statement using spatch tool Rahul Krishnan
@ 2016-12-24  7:49 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2016-12-24  7:49 UTC (permalink / raw)
  To: Rahul Krishnan, bhelgaas
  Cc: mpe, mika.westerberg, gwshan, mayurkumar.patel, keith.busch,
	julia.lawall, linux-pci, linux-kernel

On Sat, 2016-12-24 at 13:03 +0530, Rahul Krishnan wrote:
> This patch removes unnecessary return statement using spatch tool
[]
> diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
[]
> @@ -463,8 +463,7 @@ int __init rpadlpar_io_init(void)
>  		return -EPERM;
>  	}
>  
> -	rc = dlpar_sysfs_init();
> -	return rc;
> +	return dlpar_sysfs_init();
>  }
>  
>  void rpadlpar_io_exit(void)

If you are going to submit these types
of patches, please make sure you compile
test them before sending so that you can
look at new warnings.

Now rc is unused and its declaration
should be removed.

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

end of thread, other threads:[~2016-12-24  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-24  7:33 [PATCH] pci: hotplug: This patch removes unnecessary return statement using spatch tool Rahul Krishnan
2016-12-24  7:49 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).