Commit 368bae87 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Andy Shevchenko

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.

This patch fixes the following warnings:

drivers/platform/x86/acer-wmi.c: In function ‘set_u32’:
drivers/platform/x86/acer-wmi.c:1378:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (cap == ACER_CAP_WIRELESS ||
                                 ^
drivers/platform/x86/acer-wmi.c:1386:3: note: here
   case ACER_WMID:
   ^~~~
drivers/platform/x86/acer-wmi.c:1393:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
    else if (wmi_has_guid(WMID_GUID2))
            ^
drivers/platform/x86/acer-wmi.c:1395:3: note: here
   default:
   ^~~~~~~
drivers/platform/x86/acer-wmi.c: In function ‘get_u32’:
drivers/platform/x86/acer-wmi.c:1340:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (cap == ACER_CAP_MAILLED) {
      ^
drivers/platform/x86/acer-wmi.c:1344:2: note: here
  case ACER_WMID:
  ^~~~
drivers/platform/x86/acer-wmi.c: In function ‘WMID_get_u32’:
drivers/platform/x86/acer-wmi.c:1013:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (quirks->mailled == 1) {
      ^
drivers/platform/x86/acer-wmi.c:1018:2: note: here
  default:
  ^~~~~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 6d789e60
...@@ -1014,6 +1014,7 @@ static acpi_status WMID_get_u32(u32 *value, u32 cap) ...@@ -1014,6 +1014,7 @@ static acpi_status WMID_get_u32(u32 *value, u32 cap)
*value = tmp & 0x1; *value = tmp & 0x1;
return 0; return 0;
} }
/* fall through */
default: default:
return AE_ERROR; return AE_ERROR;
} }
...@@ -1340,6 +1341,7 @@ static acpi_status get_u32(u32 *value, u32 cap) ...@@ -1340,6 +1341,7 @@ static acpi_status get_u32(u32 *value, u32 cap)
status = AMW0_get_u32(value, cap); status = AMW0_get_u32(value, cap);
break; break;
} }
/* fall through */
case ACER_WMID: case ACER_WMID:
status = WMID_get_u32(value, cap); status = WMID_get_u32(value, cap);
break; break;
...@@ -1382,6 +1384,7 @@ static acpi_status set_u32(u32 value, u32 cap) ...@@ -1382,6 +1384,7 @@ static acpi_status set_u32(u32 value, u32 cap)
return AMW0_set_u32(value, cap); return AMW0_set_u32(value, cap);
} }
/* fall through */
case ACER_WMID: case ACER_WMID:
return WMID_set_u32(value, cap); return WMID_set_u32(value, cap);
case ACER_WMID_v2: case ACER_WMID_v2:
...@@ -1391,6 +1394,7 @@ static acpi_status set_u32(u32 value, u32 cap) ...@@ -1391,6 +1394,7 @@ static acpi_status set_u32(u32 value, u32 cap)
return wmid_v2_set_u32(value, cap); return wmid_v2_set_u32(value, cap);
else if (wmi_has_guid(WMID_GUID2)) else if (wmi_has_guid(WMID_GUID2))
return WMID_set_u32(value, cap); return WMID_set_u32(value, cap);
/* fall through */
default: default:
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment