From patchwork Thu Feb 25 12:55:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 387211 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp289747jap; Thu, 25 Feb 2021 04:57:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbeWBKmILGOiaxIerPCQO6U3G9GLosGMFuD+MW2J3cVSHdKJfZqEwZ0+myd0xk0Hbrpl1Y X-Received: by 2002:a17:906:7697:: with SMTP id o23mr2620115ejm.292.1614257830561; Thu, 25 Feb 2021 04:57:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614257830; cv=none; d=google.com; s=arc-20160816; b=PDEGAGbVTyX0Qw6K+RchTqY5OAyVrALBQ2jBBnYIlo9wZPaVrZ7MVndzkR31e0fo8p ihwuO4o7Gv/saa972I96HUMwjDU0hGg9/nv4wsvUN6CFCOmCXqGhkGsGyIut9krXe4Xn Q7AvXeehQ6AaIyBWVdmazfhGB1ylDc7a3BCoC75tk7BuPgGvvTXT0KNQTA8lerts4k7w dxAakWq/98ZoueiaeS2OP8wWK5RA5cLBcf42dkhyrVYpi5N3FJaKJNbMXrnal9BjD8xV tH8ydtnxDbpay1IaXgTvAqyMKxmssRfdrR5l0qeWA4dTkDZojIsttzMe6iIqJT/hjVRy LRGw== 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:dkim-signature; bh=Wf8/JiqYo8nQ9ZTCcrY8E6rS1C2m2UrX2khjYAlRiTA=; b=LiFbNSiNA+6o31orcMdpiH8CyIBJsY/jZ8iSUduGOvOPRUwHRYFggw8YdJ0ymHsgN+ 5WJMth7VtViBjMWQF6ebMmx1cCyIWMwcu61peGDTdRyjhnjLAqoFFagcljy1CFcEy+gd Tzp3W6W1gZ/bhDest9JpeVud5o7JRhV6toyO0gpEBgMqBHdu5LR8w34VqpRJLTlapILK gNIlZ27KOKxDfuXjujuPZZnqoQPRtjVkVJ8JcMY+CaNk2tFo4mEPsdfuJSCoT0iRs5Hb KOe9OyxicXqLpCiI3Z08SIg9rO4nxKPpBSc8zMWRCv49pVnVUS6E1JwMaS8pO56LPf0P 4jYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VpA+Es3n; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e4si3127953edv.36.2021.02.25.04.57.10; Thu, 25 Feb 2021 04:57:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VpA+Es3n; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233541AbhBYM4b (ORCPT + 1 other); Thu, 25 Feb 2021 07:56:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:52698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233087AbhBYM43 (ORCPT ); Thu, 25 Feb 2021 07:56:29 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F205D64EC4; Thu, 25 Feb 2021 12:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614257749; bh=IM56HS2jcyC+tX7uO3Kx0IQACMvoulpcQ1kwIFss1Y8=; h=From:To:Cc:Subject:Date:From; b=VpA+Es3n8RVmv0k82sr68P/4h+o3X4PL1A+BU84Xdyo5ko5VC6ohN684iY0y6JJ2z nLYOHtZMY080H6NcG/HMefO6FutpQbYYxGYlL9O0AHNQDLZ9mBO+kyQhtGR5hdLHtM Z80JHWc5Lx9q4tJM+a1w/tmRnLszXABEgzAzsHxiXZSxpByZetnCAc/LonKrDpOlHY X+ykl7KoOHzyQ8iZEIHNfTXcxKzglPRZs7FRkssvsgJY5pnz1FMh/ettZeR/PWlp/h Q9g2VjL8p4CkDob8nQCZAij1kglqPYFRiLYZA2PqOTECIkfgXlZz93IivQyzARXmms 4vtFHrDg6mL4w== From: Arnd Bergmann To: Mark Brown , Heiko Stuebner , Nathan Chancellor , Nick Desaulniers , Emil Renner Berthing Cc: Arnd Bergmann , Jon Lin , Chris Ruehl , Alexander Kochetkov , Johan Jonker , Vincent Pelletier , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] spi: rockchip: avoid objtool warning Date: Thu, 25 Feb 2021 13:55:34 +0100 Message-Id: <20210225125541.1808719-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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(-) -- 2.29.2 Acked-by: Emil Renner Berthing Reviewed-by: Nick Desaulniers Acked-by: Heiko Stuebner 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(); } if (use_dma) {