Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5849352ybl; Tue, 10 Dec 2019 12:31:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzU11JbJup/NRySfzQqDRSn1TUynZx0srJj4YrKk/H9NbSOXM51qvw4ATsENV68FZIbVrRX X-Received: by 2002:aca:4ad8:: with SMTP id x207mr689346oia.148.1576009874406; Tue, 10 Dec 2019 12:31:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576009874; cv=none; d=google.com; s=arc-20160816; b=XQhOMxOHjReV8EqOSfzKZjxINreo6y7Aqc8+K+42JfGVHFh0xHqBQntkLUecpWHu+F aqO0f8bWNkUGeRwx94h9iaBM+Scqv7cPndaSNAZC0YXWjyi19FbrDWu0v2AQAOxIVeqL qjYmoUrabEkc6xL+jB1wP7XhFVk9zN+VB+bPR8+0XmMB4gHSSG4wMXmisobfR2/X1/Z7 yhHGZXx2lDhGmBO2EcETPxV1wncsSSKGdWwhrFBVEzX1RyMjXeEzWolEhrzI7TaGkMky RxTbko5yxhbNyJgtQAflV6+MeEjlwDsnDcAQhyRiMTiHe9iNTo9GS1INElbeZ7i+mpVn 7zUA== 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=N1CEg+PFxsIRFaSvfZv2jVfWAEngq9/X/bEtDNMqEQ8=; b=WIIF2RtrN6NmuIPzkEIzE+1kgX29NBGG1wkBLUXrXIn1zfYofaRmsBIt4S6g0iahN5 i+4xfBXF+6we1SLSLWIoE/KwMYC1OHOs7eP7knw+lvUKJozrAecL0C79GiQFuK+DnLh+ G4D3jLLE7WE6l/CMi/gXTUS1pxLbY04qAVcDm3c0Vu61b5nm19eWlokwyWGzLP8KIzyv R56NyugA9lKebDl8Md/54pWShwwqmMCw3wDjsUQPHBpVe59jul0U4jVFFNlMX6yTcvcP lhcxF3nHlNoIyZUmrKWeKaPrfzz6zyGZquyZbvAc2+ItyzDNk01junXJq3dnrTa4kOft r+RQ== 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 l8si2723983otq.75.2019.12.10.12.31.02; Tue, 10 Dec 2019 12:31:14 -0800 (PST) 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 S1726973AbfLJU3A (ORCPT + 99 others); Tue, 10 Dec 2019 15:29:00 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:46139 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbfLJU3A (ORCPT ); Tue, 10 Dec 2019 15:29:00 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1N8GdE-1hjJuA0Kdk-014Ebs; Tue, 10 Dec 2019 21:28:46 +0100 From: Arnd Bergmann To: Linus Walleij , Bartosz Golaszewski , Joel Stanley , Andrew Jeffery Cc: Arnd Bergmann , Hongwei Zhang , 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: avoid return type warning Date: Tue, 10 Dec 2019 21:28:31 +0100 Message-Id: <20191210202842.2546758-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID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pLd+8OHImMx1O7a3tHAPP9GV1e9RE4ZY/ PeTepEbRI5+/RQ+0bq+NqBLvowYmvTpaLLeP5M1fc3LBgWW32wURRueAs/HhIgpuXzvt6f/OG eMl+mUJZ38GzOcZdS6EQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc has a hard time tracking whether BUG_ON(1) ends execution or not: drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg': drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of non-void function [-Werror=return-type] Use the simpler BUG() that gcc knows cannot continue. Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile") Signed-off-by: Arnd Bergmann --- drivers/gpio/gpio-aspeed-sgpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-aspeed-sgpio.c b/drivers/gpio/gpio-aspeed-sgpio.c index 7e99860ca447..8319812593e3 100644 --- a/drivers/gpio/gpio-aspeed-sgpio.c +++ b/drivers/gpio/gpio-aspeed-sgpio.c @@ -107,7 +107,7 @@ static void __iomem *bank_reg(struct aspeed_sgpio *gpio, return gpio->base + bank->irq_regs + GPIO_IRQ_STATUS; default: /* acturally if code runs to here, it's an error case */ - BUG_ON(1); + BUG(); } } -- 2.20.0