From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2B1DC433E0 for ; Fri, 26 Feb 2021 08:17:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D2FF64EE2 for ; Fri, 26 Feb 2021 08:17:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D2FF64EE2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VDEoUK/j40ntDuCJcbxVrZTQeQZFLpRCbaW+fMQpB5k=; b=e4TBVtyfQq22NxO1mvTIraUm7 5QUypxxfnrVhv8YL4UF9eqfW9gO6/gasJsESWnl2YuFwQiE8ApKom8+KJAvN6VdXf/haHwTle1gc7 CktJTy7Fiae3p44tVVeyJhybIQJkSZ/XF7V1HstgQ+kGpeyoTf3Ne4+Sy/29w6McRyUXdH9UyguMS dUbHLKYITdSmLC4ZTC/2h4vknwLrzheeRJKX8UKuQU0DJKehB3HB+2HDSLQoLOaigas+UpZDbDYeH Be3CNEv/Lum9SACWxHQrv4FLW5fq9z+9Gx8zSjIGyydvZeKLfQErGNusZ4rjeequ9RQJK19hklMvE 9Y2BUBzTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFYIL-0004k3-NS; Fri, 26 Feb 2021 08:16:17 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFYIJ-0004jN-HL; Fri, 26 Feb 2021 08:16:16 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 11Q8FovB105037; Fri, 26 Feb 2021 02:15:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1614327350; bh=M1DX4Z5TbpoNhnKn+jRkQPGNQQ6oXlmXqLr7m8RL0SA=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=EVXzNnfm8cSnMp0cZsY/C8lWzb9/zww+1Vf/mRyQ2Jqb7RGM9rvOwgWjmzAXL51bz D09Zgq6E0VQiWBAzUDqpT9xj5L36vT0/U16rbkd6XyQpLlG4YPWnmal/3jR3VIRgYb EvVnzHOWEwEogWR7YOxGI19Awmu40iTXHwt25/XY= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 11Q8FodB039421 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 26 Feb 2021 02:15:50 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 26 Feb 2021 02:15:50 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 26 Feb 2021 02:15:50 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 11Q8FnDe107039; Fri, 26 Feb 2021 02:15:49 -0600 Date: Fri, 26 Feb 2021 13:45:48 +0530 From: Pratyush Yadav To: Arnd Bergmann Subject: Re: [PATCH] spi: rockchip: avoid objtool warning Message-ID: <20210226081548.h5ls5fxihunzxjvx@ti.com> References: <20210225125541.1808719-1-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210225125541.1808719-1-arnd@kernel.org> User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210226_031615_714770_18C7187F X-CRM114-Status: GOOD ( 19.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Arnd Bergmann , Alexander Kochetkov , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Nathan Chancellor , linux-rockchip@lists.infradead.org, Mark Brown , Jon Lin , clang-built-linux@googlegroups.com, Vincent Pelletier , Johan Jonker , Chris Ruehl , linux-arm-kernel@lists.infradead.org, Emil Renner Berthing Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 25/02/21 01:55PM, Arnd Bergmann wrote: > From: Arnd Bergmann > > Building this file with clang leads to a an unreachable code path > causing a warning from objtool: > > drivers/spi/spi-rockchip.o: warning: objtool: rockchip_spi_transfer_one()+0x2e0: sibling call from callable instruction with modified stack frame > > Use BUG() instead of unreachable() to avoid the undefined behavior > if it does happen. > > Fixes: 65498c6ae241 ("spi: rockchip: support 4bit words") > Signed-off-by: Arnd Bergmann > --- > drivers/spi/spi-rockchip.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c > index 936ef54e0903..972beac1169a 100644 > --- a/drivers/spi/spi-rockchip.c > +++ b/drivers/spi/spi-rockchip.c > @@ -521,7 +521,7 @@ static void rockchip_spi_config(struct rockchip_spi *rs, > * ctlr->bits_per_word_mask, so this shouldn't > * happen > */ > - unreachable(); > + BUG(); checkpatch says: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() Which makes sense to me. This is not something bad enough to justify crashing the kernel. > } > > if (use_dma) { > -- > 2.29.2 > -- Regards, Pratyush Yadav Texas Instruments Inc. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel