From patchwork Thu Sep 19 13:57:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174062 Delivered-To: patch@linaro.org Received: by 2002:ac9:19ad:0:0:0:0:0 with SMTP id d45csp1010312oce; Thu, 19 Sep 2019 06:57:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0FKX/fSXPYFzDTPslqLtgjozDSMai64d753gUNvnvPupVWgW39bSfTiELbehRcuqtJZxN X-Received: by 2002:a17:906:1659:: with SMTP id n25mr14734491ejd.258.1568901463791; Thu, 19 Sep 2019 06:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568901463; cv=none; d=google.com; s=arc-20160816; b=kRdJYaE0GeUHaago7517DNYNkNk6fxjinx2BIeadk9o722af5N0YEQgtOJGCo41WxV cQv3cc8kstW2DPsRO7YfxH4+z6hCcRp9ja70QwtkEF+03sXRD1sTCfC34g9rSSoOMJ3o 631RFDc2uojSSwmKJU2beXVboRv7oMmKOsxXSeOdfp4fF0SLDb+Wd49D5NpnUDoF/XhW 3DEmSl+/5yRHdEkwT9UzFIuCIBtrZSf+K6uFxi3iVMSxLK5394hDMto/d9TW/4Rx5Ogd ceV7mnSj19FGOzOqLEs15dbq9nOVswDCpdschKIAJJtc7XLWvmvOdFuwOQlLoQRHuW/c G4QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=28CikTRyid/xH6JejQu935ygXEFfNaTe6SWPgWXNO9s=; b=xRwFzyE2T38PbliFECtWp2+V6sF4EwSg6qGsGBPlZtTVFBQ9siqzNA/Pkmh3Dcy+n3 Egyy54cIv1fQjSy+xBP6E3J4iRaSwPsxMJ/xKQOyyP1CDh3ZjScJcROjLdq+erXXsYhz ENZeoC93rJWGCLisP84/b4PXapSlD6vs7EAUEY6rdhDNdZMN7GhK3Am1WrfWdrHk4bkt MML4y6x7xdvy3wL4ALq+G94OtNnOmXVX6hcRVsuLFcYUqiYWH4pXZ/1Wu8anpVIUQMd+ KRgZX6aC0bfAJdkYlRfzoYDicfR940CRVjpg6H+cW2xGuD/bZHu8SpVVo4WJMKOvdQjU 0jpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16si4640673ejc.134.2019.09.19.06.57.43; Thu, 19 Sep 2019 06:57:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732313AbfISN5m (ORCPT + 26 others); Thu, 19 Sep 2019 09:57:42 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:46881 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727642AbfISN5k (ORCPT ); Thu, 19 Sep 2019 09:57:40 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MgwBv-1hj3F420FB-00hMbl; Thu, 19 Sep 2019 15:57:27 +0200 From: Arnd Bergmann To: Jens Axboe Cc: Arnd Bergmann , Christoph Hellwig , "Martin K. Petersen" , Max Gurtovoy , Chaitanya Kulkarni , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] block: t10-pi: fix -Wswitch warning Date: Thu, 19 Sep 2019 15:57:19 +0200 Message-Id: <20190919135725.1287963-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:tN+XsyXJdHFnCMzPxDFyb2EBaVVp1Ivx2u5rxFBl8O1rODBEDdc 2hdSU18cmnE1oADZvswr6ov0IvJhK4PJ3oQytoaedrt4HErtAJstzaERKzuZLIsVTvNQDtk MfHohPUVH457DDV34tAXV7jci0NIoFYd8ff9+pWhQMC9cORkOyXB/FePCN+chvUfRGco8JE l2dmid2zR9cFKxtAi1wvw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:PpQaXfdWnT0=:y8V8FK+UtJq3wztlx/VtDA jj8iXXuPCb+8dqOo2iliOmpthow8uIC9XPEx+E+Himl+CVCdfdP1XhFgpZQvCtu2exravP8or 6MTI68uzb3UdUxN9gvUwz+mhwnDO6ih/CmfwFrXai/oJu17MXNwf42utsidpvcP90ljXebSXj DhQW//YvpbMGAuQZ8qxvJrMnquZmnwqXr1Y94dSd990E+4jAc2dSskPqUlQRPnGfI4McpTsO5 qxRwuXWTBi1V5hh2wf5yzXTQuJ6tt0JbcCX1uffctTx0OAef5XdIe+hwj8s/Rk5w8OKikGsz5 stIb76l8Vs0y5M3Do8hwDlRaG098jIAXSISlgqy16Bq8VAiUsL5N0qxKj1zrafcPVHasSbz0v OKuI0sloaWE6j8LHdP8uRnNLqcPs7IXBQoYK4K+NZZe8s9ytFACuItItmR29D1uDZ/gqkcYTN aeHj26hLt1DR8xyDBwCpf3zGNxQLy+lzkROnt+X+EOu5zfjnu0Tzo3hJamuAZ1tPee+WO0Hy0 J2nhenYRyhUGyYYKNYqJmDj55J95j3iA3/wx5FmcL4ZY3glim165FXHu+eVfp3AchjV2DJarg HppSTRquBBxSRFMKQDdiyezsWhmC4u3Eqbm4eJrC99vLBdRzTNgvldrqRlL8v68qv1cY2+e2S 1HIIDUV9yQTqL0bju2M2H4TNqZHBzr7pGBofabq+IKg+rZMzmesVAaVBAuFfEYAxrKk2ItSG3 3TzoCv5I/HJgEpHbXYmwj/4b5/P+D+Y16pBsUugZJjx6llQ+FyiRT6t6jxoVgTgp9a28v1t20 gv/ag0HjpdgKqVxN733GTt6FFmAfYkBQ95nBqz4HywIUwP2DcfR0pwDTmR3z/S6eOjDtre1lC BEdEHyy85AO+1+gjiQnQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changing the switch() statement to symbolic constants made the compiler (at least clang-9, did not check gcc) notice that there is one enum value that is not handled here: block/t10-pi.c:62:11: error: enumeration value 'T10_PI_TYPE0_PROTECTION' not handled in switch [-Werror,-Wswitch] Add another case for the missing value and do nothing there based on the assumption that the code was working correctly already. Fixes: 9b2061b1a262 ("block: use symbolic constants for t10_pi type") Signed-off-by: Arnd Bergmann --- block/t10-pi.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.0 Reported-by: kbuild test robot Acked-by: Nick Desaulniers Reviewed-by: Nathan Chancellor diff --git a/block/t10-pi.c b/block/t10-pi.c index 0c0120a672f9..055fac923946 100644 --- a/block/t10-pi.c +++ b/block/t10-pi.c @@ -60,6 +60,8 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter, __be16 csum; switch (type) { + case T10_PI_TYPE0_PROTECTION: + break; case T10_PI_TYPE1_PROTECTION: case T10_PI_TYPE2_PROTECTION: if (pi->app_tag == T10_PI_APP_ESCAPE)