Message ID | 20210504191923.32313-1-msuchanek@suse.de (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [v2,net-next,resend] ibmvnic: remove default label from to_string switch | expand |
Related | show |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (7619d98e5041d5c25aba5428704dba6121237a9a) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | success | Build succeeded |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 20 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
On Tue, May 4, 2021 at 2:19 PM Michal Suchanek <msuchanek@suse.de> 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) { > ^~~~~~ > > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > Acked-by: Lijun Pan <lijunp213@gmail.com> > --- > v2: Fix typo in commit message > --- Hi Michal, Thank you for reposting the patch and including the Ack-by tag. I think you need to wait till next Tuesday or so when net-next reopens, then you can repost the patch. http://vger.kernel.org/~davem/net-next.html. Thanks, Lijun
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"; } /*