From patchwork Tue May 8 14:27:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10386249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 99648602C2 for ; Tue, 8 May 2018 14:27:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3700327F85 for ; Tue, 8 May 2018 14:27:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3515228641; Tue, 8 May 2018 14:27:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ACADF27F85 for ; Tue, 8 May 2018 14:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To: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=ZE0hkkWjvBTbHHVAV9WhQvZBAE5ChG+bbKCnIztcLLM=; b=jYZ SDrVLzQ9KrcsvC/XxAfA5srQjsOd+qO1yCDTpVxFZKemOWK0jMtQLsejN2Agz5+a7dsiG/hHwidFa azo/5B/PylD1zU82fUmuN0ylPKa7nh/q71ivcLXiT38Sq9b7gBhRkMUzAj0dX3Ic6abXoBwPmbEgd LEVhx1jgZDHNfJIB5kUd/bF7n5MNhcoloSkVVh6nN4OupJGwjlYZSg39YWISlWBWYW7L6AX2yVo5x KyjKHhi3nMOxOsch6at/3NdcY9/eqO2cAATy5mJuWOu0Qvtsu98xH+4yLGH6EbRS0IlP/MWMP+6L9 0A2wuNmxmYZw6ID6EtQLZx1xuzpIDGQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fG3ap-0007VR-Sb; Tue, 08 May 2018 14:27:51 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fG3ak-0007UX-Gg for linux-arm-kernel@lists.infradead.org; Tue, 08 May 2018 14:27:49 +0000 Received: from trochilidae.c.hoisthospitality.com (unknown [217.192.152.178]) by mail.kmu-office.ch (Postfix) with ESMTPSA id A088F5C00F8; Tue, 8 May 2018 16:27:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1525789649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:content-type:content-transfer-encoding: in-reply-to:references; bh=EssoWjjFvL3fPVr9tenA8gx6yiZyjb8x0RBfCHTgaR0=; b=JFYrVOT2EF3RSrkWPL1Iz/yz76NQ/8caARJ/UJ6LWqpa9pbnRJcWusOcw7btWxpl3IPoQP XOnW5F1mrXTEhUU9enpu/jBiyhhNocawX+SDZ1tu/ID+pTgb99MPyLfdDFZdpJSeSs+Nt0 AGNRujehgKQ0KtRc27eJAOV/IlG4H8w= From: Stefan Agner To: arm@kernel.org, arnd@arndb.de Subject: [PATCH v3] bus: arm-cci: remove unnecessary unreachable() Date: Tue, 8 May 2018 16:27:26 +0200 Message-Id: <20180508142726.11646-1-stefan@agner.ch> X-Mailer: git-send-email 2.17.0 X-Spamd-Result: default: False [-2.10 / 15.00]; ASN(0.00)[asn:3303, ipnet:217.192.0.0/15, country:CH]; ARC_NA(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_TWELVE(0.00)[14]; DKIM_SIGNED(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; BAYES_HAM(-3.00)[100.00%]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180508_072746_721988_0475B0DB X-CRM114-Status: GOOD ( 12.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, keescook@chromium.org, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, linux@armlinux.org.uk, Stefan Agner , linux-kernel@vger.kernel.org, mka@chromium.org, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, Bernhard.Rosenkranzer@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Mixing asm and C code is not recommended in a naked function by gcc and leads to an error when using clang: drivers/bus/arm-cci.c:2107:2: error: non-ASM statement in naked function is not supported unreachable(); ^ While the function is marked __naked it actually properly return in asm. There is no need for the unreachable() call. GCC 7.2 generates identical object files before and after, other than (for obvious reasons) the line numbers generated by WANT_WARN_ON_SLOWPATH for all the WARN()s appearing later in the file. Suggested-by: Russell King Signed-off-by: Stefan Agner Acked-by: Nicolas Pitre Reviewed-by: Robin Murphy --- Changes in v3: - Fix subject and enhance commit message Changes in v2: - Don't add assembly ASM_UNREACHABLE, just drop unreachable() drivers/bus/arm-cci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index 443e4c3fd357..b8184a903583 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -371,8 +371,6 @@ asmlinkage void __naked cci_enable_port_for_self(void) [sizeof_struct_cpu_port] "i" (sizeof(struct cpu_port)), [sizeof_struct_ace_port] "i" (sizeof(struct cci_ace_port)), [offsetof_port_phys] "i" (offsetof(struct cci_ace_port, phys)) ); - - unreachable(); } /**