From patchwork Mon Jul 9 14:56:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 141422 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2764263ljj; Mon, 9 Jul 2018 07:56:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcrZ95y/IXIUjYgMAKxNF8KDPwcp8QzRZJgBCbdMVvS3/fVEvB9NZRHC4L1WXaiaEv2Yg3v X-Received: by 2002:a63:121a:: with SMTP id h26-v6mr19625457pgl.316.1531148212375; Mon, 09 Jul 2018 07:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531148212; cv=none; d=google.com; s=arc-20160816; b=PwQYdBloLMwQrKTGajJH9EV/bmWIGmRke7m5NR1Gxc8U9QzsMWjfvyZyRNr9zuSwvv 4ZhDwGX0ghgoPi6NM/p5OjCSTDO6o+Qb/JnnNfH1GPFgTp6LVhZ8WB/Jlj8HrdP7J7Rz 5hgt14q2D5MoKkhIXcmEtXltPrJHf1cZSxNhR63aF8sVSIROb54lvZ3QP5YhESUPCGiI ohrfl1KEgMvPHpy7kfvRAgGz3RdtBHgxcZj1NSnfdJgWETHDsjtwCPmU3rxnCinRN7M0 OfmEeSZvWeUBri9nVQpmvvHN7VLgZtfodcpVghTaiYR/2wtRff3lmfQesWJ6jgfjTbxz J9UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=flktTGPRr/wtrrTvWB+nbLQ4G7q7XaKq/FihxfToNxI=; b=UB8JoIozyo2WluLRPoiZA8AkEo3pFIig5zvGHCMXcJoJkM41PvSbEsjF0QByGFPtIl CBNKK4OXJuFwq2/8Q173D7T+jkInp6yjM2NW6ZuBgoCrilg5Tywo9XT8yAx/ew7Q6lOZ vR5Ury1Lp5VkwNCTN0GjsK2Z7PNyJU3kINKoMil6J8TJ8epZP/qRLZWpqk9BY91UvVW/ tFFhRLxVvQHhW9bXs7VJ/xE6jC8K19W3JtZ38Hunsx6AHDHjEX4SkmkiTAczNwFC2Vlf L3tszlOTOQtUxYSShoCNwcGnKqytZgjsGj9kwZKoYiqS8NLuvt+e/qS7Mi2oMfsZwsPO gaTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 s9-v6si11191286pgk.384.2018.07.09.07.56.52; Mon, 09 Jul 2018 07:56:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932824AbeGIO4v (ORCPT + 5 others); Mon, 9 Jul 2018 10:56:51 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:46789 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932654AbeGIO4u (ORCPT ); Mon, 9 Jul 2018 10:56:50 -0400 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MRDId-1fW7A61fmp-00UYtD; Mon, 09 Jul 2018 16:56:17 +0200 From: Arnd Bergmann To: Linus Walleij , Joel Stanley Cc: Arnd Bergmann , Andrew Jeffery , Benjamin Herrenschmidt , Thierry Reding , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: aspeed: fix compile testing warning Date: Mon, 9 Jul 2018 16:56:03 +0200 Message-Id: <20180709145612.4166409-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:pGGVIkWKmgTZ58vQUuEMi7fAMZyR4xNewyY/2y6+GsArhO5zYvR wtXKXFmf5Fl77JYQofh5LFvwdd2LtspuCLvzuL8ZbRDB680jczOGrhMQQuj+3i2m7tVwi6o cAtzki0ltHG3HKwZw0mgA/BksuzLDm9Ypo8+rAVq0G6W7c4UjgHzlTA6kOM+kEvTauB9U67 A4tiB9QegXob24ruoiflg== X-UI-Out-Filterresults: notjunk:1; V01:K0:2HSErx1C5PM=:83xsIO9CQ4pdykahu20FqB /5qsMZjB0YjdPiCjBPhJ4KK8WJmK29QxxiZVh+1PH6rTjrqhuTpBOV6APAukrPQ4wYmI2vstP /501gPCtaOQQcEMTNDiI95dbfrmlvFi4FYlh6xojGC5kRkZXp3Amzg+E26sY288Q+yEMd/Hjc 0IK2YFSaFhYNtyHzVQmIWV0fS8FBtRSLsEUdmE3q6Zvmc1zdZXg1rKfudH+r1leeQGeNtxCEZ MiA2TaI4zJVlIrd1pU+BHDvzU786WjeBxsyZ7s5HqTXBwXdEfaDKnqmrG1nEvSWUqpElcQexb AURhCg3qyM3JK7SYTbruKV+VNfkyo+1oG9l1oIP4e8Ln4jr50W55bPoYjg8RT65oYepgMh7hN uEvyjHdKiE+tFmsF9LndfIzvr9YmhtZmAES2mc4xI81ls5lBTU2352W5iODkfWgThLOyp4ojI Hd3jcUWGeGP6E7dgMcwuQBfZRrOV3+WTdGz2367r3gYPqicdM3E29kQVdQ3fRm5PnHxL175qK B0TdeuZLi/LW3cnySQlgKvzB/xFSJKjhWhqNVGYk0fXRcuiUiVz1HB3GUyjO9KcwlP6apdbN8 NrNpX+J6nnJXN5s8+B8HfkVrfJK4UJqBxz+ytwDROPB24OKaPCweUnEgmEdgPO3iRaEUHAhju 8ylHcKJdIsZj56Svqd+Z2NBmgh03OShn5G3btcq15zc9RXKN1JGXdFESy1BMwcpZuSA0= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Gcc cannot always see that BUG_ON(1) is guaranteed to not return, so we get a warning message in some configurations: drivers/gpio/gpio-aspeed.c: In function 'bank_reg': drivers/gpio/gpio-aspeed.c:244:1: error: control reaches end of non-void function [-Werror=return-type] Using a plain BUG() is easier here and avoids the problem. Fixes: 44ddf559d579 ("gpio: aspeed: Rework register type accessors") Signed-off-by: Arnd Bergmann --- drivers/gpio/gpio-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Benjamin Herrenschmidt diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index 1e00f4045f9d..2342e154029b 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -240,7 +240,7 @@ static inline void __iomem *bank_reg(struct aspeed_gpio *gpio, case reg_cmdsrc1: return gpio->base + bank->cmdsrc_regs + GPIO_CMDSRC_1; } - BUG_ON(1); + BUG(); } #define GPIO_BANK(x) ((x) >> 5)