platform/x86: acer-wmi: mark expected switch fall-throughs
Subsystems (2)
PATCH 1/1 platform/x86: acer-wmi: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Warning level 2 was used: -Wimplicit-fallthrough=2
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- drivers/platform/x86/acer-wmi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/platform/x86/acer-wmi.c +4 -0
@@ -1018,6 +1018,7 @@ static acpi_status WMID_get_u32(u32 *value, u32 cap) *value = tmp &0x1 ;return 0 ; } +/* else: fall through */ default :return AE_ERROR ; }
@@ -1344,6 +1345,7 @@ static acpi_status get_u32(u32 *value, u32 cap) status =AMW0_get_u32 (value, cap);break ; } +/* else: fall through */ case ACER_WMID : status =WMID_get_u32 (value, cap);break ;
@@ -1386,6 +1388,7 @@ static acpi_status set_u32(u32 value, u32 cap)return AMW0_set_u32 (value, cap); } +/* else: fall through */ case ACER_WMID :return WMID_set_u32 (value, cap);case ACER_WMID_v2:
@@ -1395,6 +1398,7 @@ static acpi_status set_u32(u32 value, u32 cap)return wmid_v2_set_u32 (value, cap); else if (wmi_has_guid(WMID_GUID2)) return WMID_set_u32(value, cap); +/* else: fall through */ default :return AE_BAD_PARAMETER ; }
Signature · 1 line
2.7.4
Quoted 31 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Warning level 2 was used: -Wimplicit-fallthrough=2
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/platform/x86/acer-wmi.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/platform/x86/acer-wmi.c +2
-0@@ -1018,6 +1018,7 @@ static acpi_status WMID_get_u32(u32 *value, u32 cap) *value = tmp &0x1 ;return 0 ; } +/* else: fall through */ default :return AE_ERROR ; }@@ -1344,6 +1345,7 @@ static acpi_status get_u32(u32 *value, u32 cap) status =AMW0_get_u32 (value, cap);break ; } +/* else: fall through */ case ACER_WMID : status =WMID_get_u32 (value, cap);break ;
drivers/platform/x86/acer-wmi.c static acpi_status set_u32(u32 value, u32 cap) · line 1391
Quoted 4 lines
drivers/platform/x86/acer-wmi.c +1
-0@@ -1386,6 +1388,7 @@ static acpi_status set_u32(u32 value, u32 cap)return AMW0_set_u32 (value, cap); } +/* else: fall through */
I suspect you are correct, bu these last two weren't obviously intentional to me. Has this seen any testing?
Signature · 2 lines
Darren Hart VMware Open Source Technology Center