From patchwork Fri Mar 1 17:40:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13578865 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 907A0C5478C for ; Fri, 1 Mar 2024 17:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/wUsB9j7TzCbVCsYmqZFw+RyuPcvI4dKWxZvDhFj+sE=; b=Wi6SaaFOmLcQny 78s7/G/bPi3Y/qgPPWmrJAA7pwhmYtt9SupQaLKZQL53b08NHCAp2kxMBg+dkAlQU41E859/zO4su Z5KbWdtCyarzLN9ZFxU3JXNlIKsoMDWS4MGxcrHu6dD3zs2NZsaGUL802YmzL5IJaYP2Gf/iohzy+ g7/48W1T2hekadFiPc//PdIKhLlDIGa2OhYhB6r855uWfPTPUmXFYemFPs77zW7HDco881VtMzB/k KkAwmJb2FrLzmlotiD8kqblrH3qcKCmHWT5CBJswxNUkLeMBeRU1ZYzmY/wT5IBJwuxn/j2UnO9vd 3XwzxWwZAcTBCxUV2W1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg6rp-00000001NoG-1zky; Fri, 01 Mar 2024 17:40:17 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg6rm-00000001NnM-2BSw for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 17:40:15 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 58B23619BD; Fri, 1 Mar 2024 17:40:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B21ABC43394; Fri, 1 Mar 2024 17:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709314813; bh=NY2+S+4ftdoGJbkK25bKSEu+LmVTZzCG/sAQVPrZHfA=; h=From:Date:Subject:To:Cc:From; b=Jw4zy5NL+gUW+xYZRwSOxIMS892o/JzeH/fWgQ5pnYcAksKcylFf8BKPSFrvutFgF Hh4RCxlXluFIz465yJe1hQ0JkLiAElexKhz6pU++XKlcDP9cJ6AN0LRhy4CpFWHyyK s7dBUsPwkPKrYTLE1KODk7ISJMDRODUVsuI1v23KELZIXJarA81mLSFZ81Cqk6gyci wevgn6dW9o02x1J+5E4oChTgbuq562ijd5pRpcHNYKQfDMWv/KmSpu7uwlTMJ2rANM HhEPCNN3sGbGLI+xcEotFOCZK+4sVvF4wgcJzp4yFG5wyR3BDBgiyUNrAibt5Z93j/ iN6LAGKzFSskw== From: Nathan Chancellor Date: Fri, 01 Mar 2024 10:40:01 -0700 Subject: [PATCH] PCI: imx6: Fix clang -Wimplicit-fallthrough in imx6_pcie_probe() MIME-Version: 1.0 Message-Id: <20240301-pci-imx6-fix-clang-implicit-fallthrough-v1-1-db78c7cbb384@kernel.org> X-B4-Tracking: v=1; b=H4sIAPAS4mUC/x3NSwqEMAwG4KtI1gZSdQTnKoMLbVMbqFpaZxDEu xtm+cH/uKBwFi7wri7I/JMi+6YwdQU2TNvCKE4NDTUdtWQwWUFZzx69nGijRpQpipUD/RTjEfL +XQK6ee7d8CLjqQNdS5m18X/6jPf9AD5JdPh5AAAA To: hongxing.zhu@nxp.com, l.stach@pengutronix.de, lpieralisi@kernel.org, kw@linux.com Cc: robh@kernel.org, bhelgaas@google.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Frank.Li@nxp.com, manivannan.sadhasivam@linaro.org, p.zabel@pengutronix.de, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev, patches@lists.linux.dev, kernel test robot , Nathan Chancellor X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1868; i=nathan@kernel.org; h=from:subject:message-id; bh=NY2+S+4ftdoGJbkK25bKSEu+LmVTZzCG/sAQVPrZHfA=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKmPhH4rJWUov71fwT4321UsZ2JzVHe/ndH7kMxX98vYv /rp+1R0lLIwiHExyIopslQ/Vj1uaDjnLOONU5Ng5rAygQxh4OIUgInYzWJkeH5LcWGBuLw755wM hYZSFTfxBVN3MdaVBT8v0t7wMSyviuF/maHzJNuX3+/I71XVOHy6L44x58Azqx2bXr8slCk9etm HEQA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240301_094014_697719_4E781AAA X-CRM114-Status: GOOD ( 10.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Clang warns (or errors with CONFIG_WERROR=y or W=e): drivers/pci/controller/dwc/pci-imx6.c:1333:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] 1333 | default: | ^ drivers/pci/controller/dwc/pci-imx6.c:1333:2: note: insert 'break;' to avoid fall-through 1333 | default: | ^ | break; 1 error generated. Clang is a little more pedantic than GCC, which does not warn when falling through to a case that is just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst, which states that all switch/case blocks must end in either break, fallthrough, continue, goto, or return. Add the missing break to silence the warning. Fixes: 666a7beb942c ("PCI: imx6: Simplify reset handling by using by using *_FLAG_HAS_*_RESET") Closes: https://github.com/ClangBuiltLinux/linux/issues/2004 Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403011431.vIVOdwob-lkp@intel.com/ Signed-off-by: Nathan Chancellor --- drivers/pci/controller/dwc/pci-imx6.c | 1 + 1 file changed, 1 insertion(+) --- base-commit: b73259dcd67094e883104a0390852695caf3f999 change-id: 20240301-pci-imx6-fix-clang-implicit-fallthrough-dbb6d9501f04 Best regards, diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 7cd165d03649..99a60270b26c 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1330,6 +1330,7 @@ static int imx6_pcie_probe(struct platform_device *pdev) case IMX7D: if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR) imx6_pcie->controller_id = 1; + break; default: break; }