Skip to contentSkip to conversation

ACPI: SPCR: Mark expected switch fall-through in acpi_parse_spcr

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Feb 9, 2018 – Feb 14, 2018 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: SPCR: Mark expected switch fall-through in acpi_parse_spcr

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Addresses-Coverity-ID: 1465078

---
This code was compiled with GCC 7.3.0

 drivers/acpi/spcr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/acpi/spcr.c +1 -0
index 89e97d2..9d52743 100644
@@ -115,6 +115,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
 			table->serial_port.access_width))) {
 		default:
 			pr_err("Unexpected SPCR Access Width.  Defaulting to byte size\n");
+			/* fall through */
 		case 8:
 			iotype = "mmio";
 			break;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 17 lines · CET Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Addresses-Coverity-ID: 1465078

---
This code was compiled with GCC 7.3.0

 drivers/acpi/spcr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/acpi/spcr.c +0 -0
index 89e97d2..9d52743 100644

drivers/acpi/spcr.c int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console) · line 121

Quoted 7 lines
drivers/acpi/spcr.c +1 -0
@@ -115,6 +115,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
 			table->serial_port.access_width))) {
 		default:
 			pr_err("Unexpected SPCR Access Width.  Defaulting to byte size\n");
+			/* fall through */
 		case 8:
 			iotype = "mmio";
 			break;

Applied, thanks!