Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2111477pxj; Wed, 19 May 2021 23:54:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1zO7uVz0ZpfzZRW0HEven2bcpdrbbYZM0t9AEAY1RZbLwq7IYKvKD1oTAoPDifU+GgbPy X-Received: by 2002:aa7:d94f:: with SMTP id l15mr3480489eds.235.1621493650075; Wed, 19 May 2021 23:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621493650; cv=none; d=google.com; s=arc-20160816; b=SHl0Dxa5X7suWty6mIn6800UI8ICPOOhSYkSzwX+vh2Fz58iIA8gR1qObTTRDw/5U3 5FJnUCIGuI4KyB67TeT9+KMonviGHRX8XuCndmK3/yC7XZH1tOiqn7g4gMAin24KwuxQ EKoIyCwyk5krQQvJI0Cxuvp5POi8NDWbGlZH4JUfiu1C1cCd0PM+V6tKfu742pZzAor/ miuJryfDtdzWtyt7K7Rmd+lytiW+oxQ/CdYiyTHI/mWVZbVluqR/DD71gNac7Se1o1K9 CDNbhsDBkHW1demU8xKujKC5oqLm01z5uIp0SbEhGh8/PGTTvi/Aigz852wIz4hoaaDp n97g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ak+2N5V5+785NW8nO8YFG4TIvLaiQkcS8dN4oYeqoVY=; b=Y8ELW4bE0dujEZmfnF83/PQE2Gj7B+2HXOsm4a/f7x0hQtgAvRMAfDfirSPReN8t5Z FU/+YkbgrQXgfkvKbYS/zOLWrrkJx2tRrO9IWtaCPnbvio4fA7Pt8TiESzTk6hRmV27A 8gJQ4Pidp/BjPc2Rj030PXGnpzuCA6xmLZpS1RrO+Jbzvf2melncCKyDvN7ZkOS/3ulr z8jiBhjk6+xbYhG3SVBoQh8/LYlSxECBafmecvWit7L0xXrjkC/E68F5sEgQj2XQyS6G w9X51+c7J7/UhxaBZoc+tNleG2TLwSWz2a6c9x9i+IMiJHZnmm58cVCQMgkySMx34iEA KJhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si1760916edd.348.2021.05.19.23.53.41; Wed, 19 May 2021 23:54:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230398AbhETGv7 (ORCPT + 99 others); Thu, 20 May 2021 02:51:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:56116 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhETGv7 (ORCPT ); Thu, 20 May 2021 02:51:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 30D35B024; Thu, 20 May 2021 06:50:37 +0000 (UTC) From: Michal Suchanek To: netdev@vger.kernel.org Cc: Michal Suchanek , Lijun Pan , Dany Madden , Sukadev Bhattiprolu , Thomas Falcon , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , "David S. Miller" , Jakub Kicinski , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 net-next resend] ibmvnic: remove default label from to_string switch Date: Thu, 20 May 2021 08:50:34 +0200 Message-Id: <20210520065034.5912-1-msuchanek@suse.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Lijun Pan Link: https://lore.kernel.org/netdev/CAOhMmr701LecfuNM+EozqbiTxFvDiXjFdY2aYeKJYaXq9kqVDg@mail.gmail.com/ --- v2: Fix typo in commit message --- drivers/net/ethernet/ibm/ibmvnic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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"; } /* -- 2.26.2