Received: by 10.192.165.148 with SMTP id m20csp4372516imm; Tue, 8 May 2018 07:28:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrIDCe9u4rX+GNHdzCHcBo9e6CLv3onwjCKtcvMpozz7+G8avRMbxCqiedr4ch8/sXMcNAw X-Received: by 2002:a17:902:7615:: with SMTP id k21-v6mr26972409pll.97.1525789726604; Tue, 08 May 2018 07:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525789726; cv=none; d=google.com; s=arc-20160816; b=wpif25WwlAXZOAp5cFstwhST/U8RPV6iuXXlb7QcHzXAKk0myksfLw5bopFsK+ChzA NbGJbqKBblZ+bSED4HrSHD4Za40VNyE7arMatNmXNaGVLbq1qSOwPnsfN5qL+QJtqU0Y 7ALaB1YQWqfW00gUktiEFtbBHWRPahUKZfX31vDemTMJyLY5L0BTs2rdYWVsOUUThB15 njRyvyib9VlbwLPXggk0sl+9Z5rNHB3Qnai2TlzzNMorjCceEa5BUhrfcRvYwPOo2ec8 iLYNkDtZSZb7+cqnB5rp4adO7evmhi3Use16a9ZPB7IA1KNWxTnPLtDzR6XoDtyMsvaE nrAg== 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 :dkim-signature:arc-authentication-results; bh=EssoWjjFvL3fPVr9tenA8gx6yiZyjb8x0RBfCHTgaR0=; b=VQqcug6VkfqODZCRalSalnw/f3OYfDsFauwR9NGJrfESpL3z606FRcu2t/gnhN0Vor 6+ASTB+to9o6k6NGCEVRD4lhX8K3g1qXukX3uA2xfVrsHbediOsYcAr+Gf+IRsZcWEZy f0QM2NeyLlXynWJVrQng73vFENu02LX01veTdQ11NCdYzp/Oelsg1k4pb3uYUTsf+O+x 5gYn0LuGN2OSoVIatlIAz6HaS2eB0a9X1lqOp/rG+U9jnYsi6mHQQNaiM2Vjqte1r3wN UQmBYU/P/B8qCmDmI8ZpSVoyfDCzlXWsbucczNXldYYXA9d/4K7vusqBAwo09ANbp6eh TrrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=JFYrVOT2; 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 l7-v6si24172123pls.93.2018.05.08.07.28.31; Tue, 08 May 2018 07:28:46 -0700 (PDT) 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; dkim=pass header.i=@agner.ch header.s=dkim header.b=JFYrVOT2; 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 S932552AbeEHO1c (ORCPT + 99 others); Tue, 8 May 2018 10:27:32 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:42946 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932376AbeEHO1a (ORCPT ); Tue, 8 May 2018 10:27:30 -0400 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 Cc: linux@armlinux.org.uk, ard.biesheuvel@linaro.org, robin.murphy@arm.com, nicolas.pitre@linaro.org, marc.zyngier@arm.com, behanw@converseincode.com, keescook@chromium.org, Bernhard.Rosenkranzer@linaro.org, mka@chromium.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Agner 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)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(); } /** -- 2.17.0