PCI: Mark expected switch fall-through
PATCH 1/1 PCI: Mark expected switch fall-through
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:
^~~~--- drivers/pci/hotplug/ibmphp_res.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/hotplug/ibmphp_res.c +1 -0
@@ -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:
Signature · 1 line
2.22.0
Quoted 6 lines · Gustavo A. R. Silva
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=]
Quoted 7 lines
function = 0x8; ~~~~~~~~~^~~~~ drivers/pci/hotplug/ibmphp_res.c:1944:6: note: here case PCI_HEADER_TYPE_MULTIBRIDGE: ^~~~Signed-off-by Gustavo A. R. Silva <[email protected]>
-Kees
Quoted 19 lines
--- drivers/pci/hotplug/ibmphp_res.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/hotplug/ibmphp_res.c +1
-0@@ -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: Signature · 1 line
2.22.0
Signature · 1 line
Kees Cook
Quoted 6 lines · Gustavo A. R. Silva
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=]
Quoted 7 lines
function = 0x8; ~~~~~~~~~^~~~~ drivers/pci/hotplug/ibmphp_res.c:1944:6: note: here case PCI_HEADER_TYPE_MULTIBRIDGE: ^~~~Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied with Kees' reviewed-by to pci/misc for v5.4, thanks, Gustavo!
Quoted 19 lines
--- drivers/pci/hotplug/ibmphp_res.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/hotplug/ibmphp_res.c +1
-0@@ -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: Signature · 1 line
2.22.0