Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp907934rwd; Tue, 16 May 2023 09:07:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5cG7ctoCUZkkHHeYbHx1+8ln3+Q5FwsOG7aKoUZj1PSjAWgCgcLXIpWe/bgh8XsdN3GXNI X-Received: by 2002:a05:6870:6249:b0:184:4:3038 with SMTP id r9-20020a056870624900b0018400043038mr18187282oak.24.1684253250602; Tue, 16 May 2023 09:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253250; cv=none; d=google.com; s=arc-20160816; b=WELtxxFc0yO94rBpyg64vheJHVYb8NWDwSEctBZz7b1AIONIHulED1QQcx0c/VV1J0 IdJ0hZHMKvJW+gZAAnIXeSi5gB8n/cDG4ZN/kLCagOiQ+FqNKHN/iujdJMO1A9lSbxoH NKdh8SHpFmpJ7xlA5u761vJownmYdK1XFIBaQ7wLhe1fQ26+zq5L0R/xvpIRqVRv8SRy K3O+i8eAyueCP9ilIldwjomL9QCemgvEi0f+3l8HQIHcqkH1UnFJ8oQfke1oT9DScgVd tMb9hs94HbqKrE+otTmMoQOmfzw7fatdRXtoqf7+llbI2dMmJckZXXR/LP2RTDGAbFte 0xqw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uDI7Sj9mBaC3wqeVq4cdSpw75EqJ06RL/CtCM2ri1ws=; b=Tt7D9odkw2CCVRjw+AWKg8XXQ0AX+VDiTJFZOIVuqWJkWLdKonoBMeMEYqqtifxvjm jzDtHqLzAZ14YgqYFmZr5XYfM4ZedftrdaKHLtAgO/qV2ZAOiig0KO3bHqzOzE6w9/3V hvmi+k/i0H6Z7tsuYqhQcOypHQY9L+TT/XIOk+9WO5lzYqkWYi3hkG8Rt92GTzjcDV1C 8lJEEpTlcfwt9cTQAWq3gDhiUSTl/ulqfAEQO42xIs3A44JA9jX1mrpn2l+BDBew98TM tDkLHVqcOGrVdC86vC+kCciVbqv2IqPIy5OzEp7Nd9UYomTKceOFEg1x6mnxqG1jcNoB IC9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=htRLSIuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm13-20020a056870b60d00b0019640f81059si11082772oab.211.2023.05.16.09.07.16; Tue, 16 May 2023 09:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=htRLSIuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S233282AbjEPPq6 (ORCPT + 99 others); Tue, 16 May 2023 11:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233481AbjEPPq5 (ORCPT ); Tue, 16 May 2023 11:46:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B067F8A6A; Tue, 16 May 2023 08:46:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 87F1C63B8E; Tue, 16 May 2023 15:46:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8394C4339E; Tue, 16 May 2023 15:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684251984; bh=QS657WnsM8vdXz+21VxN72PAoIydoXyXYs6qMuHutIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=htRLSIukiytswKjvEU7b5krt5Y3Y7ljURy8QF8CGb+x2h1ssvwjVk6Pwqv4ut3Esw CB1OiulX7s10M9KVGVETJOiHcuxpyhee8hUZkmO5UEaMi+KR8LO8hYWzalhm3RlHqo 09xGWJMYFj2+fN7HqZvVXQrPQTX7Y7qmuRJ61d3Y/JHUn94ohkbZ4djv+Oyi/Mtl+w XedetTwh9Y23tsy+DfBDvhPwgSkMUwAXkk+Ad6STis8PVcvL9li3Po/5JkWHc9yLNX Yq2AjCQlVGQybK9eMHfvOn6iETC5ttftvRPasbRn7XnG8UUlUFRX/e9rR3DVFZu0bl cIvS1mbMNeQRw== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 02/16] ARM: traps: hide unused functions on NOMMU Date: Tue, 16 May 2023 17:45:51 +0200 Message-Id: <20230516154605.517690-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann A couple of functions in this file are only used on MMU-enabled builds, and never even declared otherwise, causing these build warnings: arch/arm/kernel/traps.c:759:6: error: no previous prototype for '__pte_error' [-Werror=missing-prototypes] arch/arm/kernel/traps.c:764:6: error: no previous prototype for '__pmd_error' [-Werror=missing-prototypes] arch/arm/kernel/traps.c:769:6: error: no previous prototype for '__pgd_error' [-Werror=missing-prototypes] Protect these in an #ifdef to avoid the warnings and save a little bit of .text space. Signed-off-by: Arnd Bergmann --- arch/arm/kernel/traps.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 40c7c807d67f..3bad79db5d6e 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -756,6 +756,7 @@ void __readwrite_bug(const char *fn) } EXPORT_SYMBOL(__readwrite_bug); +#ifdef CONFIG_MMU void __pte_error(const char *file, int line, pte_t pte) { pr_err("%s:%d: bad pte %08llx.\n", file, line, (long long)pte_val(pte)); @@ -770,6 +771,7 @@ void __pgd_error(const char *file, int line, pgd_t pgd) { pr_err("%s:%d: bad pgd %08llx.\n", file, line, (long long)pgd_val(pgd)); } +#endif asmlinkage void __div0(void) { -- 2.39.2