From: Bjorn Helgaas <helgaas@kernel.org>
To: Krzysztof Wilczynski <kw@linux.com>
Cc: Scott Murray <scott@spiteful.org>,
Tyrel Datwyler <tyreld@linux.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Lukas Wunner <lukas@wunner.de>,
YueHaibing <yuehaibing@huawei.com>,
Sebastian Ott <sebott@linux.ibm.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] PCI: hotplug: Remove surplus return from a void function
Date: Tue, 27 Aug 2019 18:17:10 -0500 [thread overview]
Message-ID: <20190827231710.GH9987@google.com> (raw)
In-Reply-To: <20190826095143.21353-1-kw@linux.com>
On Mon, Aug 26, 2019 at 11:51:43AM +0200, Krzysztof Wilczynski wrote:
> Remove unnecessary empty return statement at the end of a void
> function in the following:
>
> - drivers/pci/hotplug/cpci_hotplug_core.c: cleanup_slots()
> - drivers/pci/hotplug/cpqphp_core.c: pci_print_IRQ_route()
> - drivers/pci/hotplug/cpqphp_ctrl.c: cpqhp_pushbutton_thread()
> - drivers/pci/hotplug/cpqphp_ctrl.c: interrupt_event_handler()
> - drivers/pci/hotplug/cpqphp_nvram.h: compaq_nvram_init()
> - drivers/pci/hotplug/rpadlpar_core.c: rpadlpar_io_init()
> - drivers/pci/hotplug/rpaphp_core.c: cleanup_slots()
>
> Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
Applied to pci/trivial for v5.4, thanks!
I squashed the mediatek patch into this since they're both trivial.
> ---
> drivers/pci/hotplug/cpci_hotplug_core.c | 1 -
> drivers/pci/hotplug/cpqphp_core.c | 1 -
> drivers/pci/hotplug/cpqphp_ctrl.c | 4 ----
> drivers/pci/hotplug/cpqphp_nvram.h | 5 +----
> drivers/pci/hotplug/rpadlpar_core.c | 1 -
> drivers/pci/hotplug/rpaphp_core.c | 1 -
> 6 files changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c
> index 603eadf3d965..d0559d2faf50 100644
> --- a/drivers/pci/hotplug/cpci_hotplug_core.c
> +++ b/drivers/pci/hotplug/cpci_hotplug_core.c
> @@ -563,7 +563,6 @@ cleanup_slots(void)
> }
> cleanup_null:
> up_write(&list_rwsem);
> - return;
> }
>
> int
> diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
> index 16bbb183695a..b8aacb41a83c 100644
> --- a/drivers/pci/hotplug/cpqphp_core.c
> +++ b/drivers/pci/hotplug/cpqphp_core.c
> @@ -173,7 +173,6 @@ static void pci_print_IRQ_route(void)
> dbg("%d %d %d %d\n", tbus, tdevice >> 3, tdevice & 0x7, tslot);
>
> }
> - return;
> }
>
>
> diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
> index b7f4e1f099d9..68de958a9be8 100644
> --- a/drivers/pci/hotplug/cpqphp_ctrl.c
> +++ b/drivers/pci/hotplug/cpqphp_ctrl.c
> @@ -1872,8 +1872,6 @@ static void interrupt_event_handler(struct controller *ctrl)
> }
> } /* End of FOR loop */
> }
> -
> - return;
> }
>
>
> @@ -1943,8 +1941,6 @@ void cpqhp_pushbutton_thread(struct timer_list *t)
>
> p_slot->state = STATIC_STATE;
> }
> -
> - return;
> }
>
>
> diff --git a/drivers/pci/hotplug/cpqphp_nvram.h b/drivers/pci/hotplug/cpqphp_nvram.h
> index 918ff8dbfe62..70e879b6a23f 100644
> --- a/drivers/pci/hotplug/cpqphp_nvram.h
> +++ b/drivers/pci/hotplug/cpqphp_nvram.h
> @@ -16,10 +16,7 @@
>
> #ifndef CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM
>
> -static inline void compaq_nvram_init(void __iomem *rom_start)
> -{
> - return;
> -}
> +static inline void compaq_nvram_init(void __iomem *rom_start) { }
>
> static inline int compaq_nvram_load(void __iomem *rom_start, struct controller *ctrl)
> {
> diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
> index 182f9e3443ee..977946e4e613 100644
> --- a/drivers/pci/hotplug/rpadlpar_core.c
> +++ b/drivers/pci/hotplug/rpadlpar_core.c
> @@ -473,7 +473,6 @@ int __init rpadlpar_io_init(void)
> void rpadlpar_io_exit(void)
> {
> dlpar_sysfs_exit();
> - return;
> }
>
> module_init(rpadlpar_io_init);
> diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
> index c3899ee1db99..18627bb21e9e 100644
> --- a/drivers/pci/hotplug/rpaphp_core.c
> +++ b/drivers/pci/hotplug/rpaphp_core.c
> @@ -408,7 +408,6 @@ static void __exit cleanup_slots(void)
> pci_hp_deregister(&slot->hotplug_slot);
> dealloc_slot_struct(slot);
> }
> - return;
> }
>
> static int __init rpaphp_init(void)
> --
> 2.22.1
>
next prev parent reply other threads:[~2019-08-27 23:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 9:51 [PATCH] PCI: hotplug: Remove surplus return from a void function Krzysztof Wilczynski
2019-08-27 23:17 ` Bjorn Helgaas [this message]
2019-08-29 0:11 ` Tyrel Datwyler
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=20190827231710.GH9987@google.com \
--to=helgaas@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lukas@wunner.de \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=rjw@rjwysocki.net \
--cc=scott@spiteful.org \
--cc=sebott@linux.ibm.com \
--cc=tyreld@linux.ibm.com \
--cc=yuehaibing@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).