Message ID | 20210520065034.5912-1-msuchanek@suse.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 07b5dc1d515a9a9b3973e0bdc716a78adf6db8f8 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v2,net-next,resend] ibmvnic: remove default label from to_string switch | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 10 of 10 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 3 this patch: 3 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 20 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 20 May 2021 08:50:34 +0200 you wrote: > This way the compiler warns when a new value is added to the enum but > not to the string translation like: > > drivers/net/ethernet/ibm/ibmvnic.c: In function 'adapter_state_to_string': > drivers/net/ethernet/ibm/ibmvnic.c:832:2: warning: enumeration value 'VNIC_FOOBAR' not handled in switch [-Wswitch] > switch (state) { > ^~~~~~ > drivers/net/ethernet/ibm/ibmvnic.c: In function 'reset_reason_to_string': > drivers/net/ethernet/ibm/ibmvnic.c:1935:2: warning: enumeration value 'VNIC_RESET_FOOBAR' not handled in switch [-Wswitch] > switch (reason) { > ^~~~~~ > > [...] Here is the summary with links: - [v2,net-next,resend] ibmvnic: remove default label from to_string switch https://git.kernel.org/netdev/net-next/c/07b5dc1d515a You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 5788bb956d73..4d439413f6d9 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -846,9 +846,8 @@ static const char *adapter_state_to_string(enum vnic_state state) return "REMOVING"; case VNIC_REMOVED: return "REMOVED"; - default: - return "UNKNOWN"; } + return "UNKNOWN"; } static int ibmvnic_login(struct net_device *netdev) @@ -1946,9 +1945,8 @@ static const char *reset_reason_to_string(enum ibmvnic_reset_reason reason) return "TIMEOUT"; case VNIC_RESET_CHANGE_PARAM: return "CHANGE_PARAM"; - default: - return "UNKNOWN"; } + return "UNKNOWN"; } /*