* [PATCH] PCI: Mark expected switch fall-through
@ 2019-08-02 1:22 Gustavo A. R. Silva
2019-08-02 5:10 ` Kees Cook
2019-08-02 13:48 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-08-02 1:22 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Gustavo A. R. Silva, Kees Cook
Mark switch cases where we are expecting to fall through.
This patch fixes the following warning (Building: allmodconfig i386):
drivers/pci/hotplug/ibmphp_res.c: In function ‘update_bridge_ranges’:
drivers/pci/hotplug/ibmphp_res.c:1943:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
function = 0x8;
~~~~~~~~~^~~~~
drivers/pci/hotplug/ibmphp_res.c:1944:6: note: here
case PCI_HEADER_TYPE_MULTIBRIDGE:
^~~~
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/pci/hotplug/ibmphp_res.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c
index 5e8caf7a4452..1e1ba66cfd1e 100644
--- a/drivers/pci/hotplug/ibmphp_res.c
+++ b/drivers/pci/hotplug/ibmphp_res.c
@@ -1941,6 +1941,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
break;
case PCI_HEADER_TYPE_BRIDGE:
function = 0x8;
+ /* Fall through */
case PCI_HEADER_TYPE_MULTIBRIDGE:
/* We assume here that only 1 bus behind the bridge
TO DO: add functionality for several:
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: Mark expected switch fall-through
2019-08-02 1:22 [PATCH] PCI: Mark expected switch fall-through Gustavo A. R. Silva
@ 2019-08-02 5:10 ` Kees Cook
2019-08-02 13:48 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2019-08-02 5:10 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: Bjorn Helgaas, linux-pci, linux-kernel
On Thu, Aug 01, 2019 at 08:22:48PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warning (Building: allmodconfig i386):
>
> drivers/pci/hotplug/ibmphp_res.c: In function ‘update_bridge_ranges’:
> drivers/pci/hotplug/ibmphp_res.c:1943:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
> function = 0x8;
> ~~~~~~~~~^~~~~
> drivers/pci/hotplug/ibmphp_res.c:1944:6: note: here
> case PCI_HEADER_TYPE_MULTIBRIDGE:
> ^~~~
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> drivers/pci/hotplug/ibmphp_res.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c
> index 5e8caf7a4452..1e1ba66cfd1e 100644
> --- a/drivers/pci/hotplug/ibmphp_res.c
> +++ b/drivers/pci/hotplug/ibmphp_res.c
> @@ -1941,6 +1941,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
> break;
> case PCI_HEADER_TYPE_BRIDGE:
> function = 0x8;
> + /* Fall through */
> case PCI_HEADER_TYPE_MULTIBRIDGE:
> /* We assume here that only 1 bus behind the bridge
> TO DO: add functionality for several:
> --
> 2.22.0
>
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: Mark expected switch fall-through
2019-08-02 1:22 [PATCH] PCI: Mark expected switch fall-through Gustavo A. R. Silva
2019-08-02 5:10 ` Kees Cook
@ 2019-08-02 13:48 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2019-08-02 13:48 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: linux-pci, linux-kernel, Kees Cook
On Thu, Aug 01, 2019 at 08:22:48PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warning (Building: allmodconfig i386):
>
> drivers/pci/hotplug/ibmphp_res.c: In function ‘update_bridge_ranges’:
> drivers/pci/hotplug/ibmphp_res.c:1943:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
> function = 0x8;
> ~~~~~~~~~^~~~~
> drivers/pci/hotplug/ibmphp_res.c:1944:6: note: here
> case PCI_HEADER_TYPE_MULTIBRIDGE:
> ^~~~
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Applied with Kees' reviewed-by to pci/misc for v5.4, thanks, Gustavo!
> ---
> drivers/pci/hotplug/ibmphp_res.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c
> index 5e8caf7a4452..1e1ba66cfd1e 100644
> --- a/drivers/pci/hotplug/ibmphp_res.c
> +++ b/drivers/pci/hotplug/ibmphp_res.c
> @@ -1941,6 +1941,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
> break;
> case PCI_HEADER_TYPE_BRIDGE:
> function = 0x8;
> + /* Fall through */
> case PCI_HEADER_TYPE_MULTIBRIDGE:
> /* We assume here that only 1 bus behind the bridge
> TO DO: add functionality for several:
> --
> 2.22.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-02 13:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 1:22 [PATCH] PCI: Mark expected switch fall-through Gustavo A. R. Silva
2019-08-02 5:10 ` Kees Cook
2019-08-02 13:48 ` Bjorn Helgaas
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).