Message ID | 20230516154605.517690-3-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp530157vqo; Tue, 16 May 2023 08:54:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oK62ygHTef0jH7KfzX/HdE1tHqXd2Pn2uv7Y1XXNykymXpj6cdfMOTtmapFG+ONAbg4dU X-Received: by 2002:a05:6a00:2401:b0:63d:2c2f:e3a2 with SMTP id z1-20020a056a00240100b0063d2c2fe3a2mr49079621pfh.18.1684252462386; Tue, 16 May 2023 08:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252462; cv=none; d=google.com; s=arc-20160816; b=YBXI2FsEoPUXfRdfIgFMY+b38+W8yxI8BoqXFNLy0C7VBz+YMhilyNG3VGudbeokO+ tPR0NKdW2RomSuP9pWZ5bhV9aftb9gsHDAPXvaqS5HIVzfFkQjuLLygwyZ4yOXQfBVaR z5n9US9oc1tZ4zbkvr+miwLDkmoR6MRmoeo7S/lm6SDqk9Af5gyB2dLAajJsZO/gRipB fRzuS9Tk6IRHRoMtmwhit09py3OFUzPenhqLqfGxx0B6PR/6WK89wkDtoIt0KJPbaZT1 oe3fVuSI4Epg6ZlK+ohJKKU+LpmwM3BRrZOl7SxHyr/pHzRtYAlzwARjlDZnmKO+85zl pdnQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020aa78e89000000b006430adc8138si20122039pfr.170.2023.05.16.08.54.07; Tue, 16 May 2023 08:54:22 -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 S234044AbjEPPq6 (ORCPT <rfc822;peekingduck44@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <arnd@kernel.org> To: Russell King <linux@armlinux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Oleg Nesterov <oleg@redhat.com>, "Rafael J. Wysocki" <rafael@kernel.org>, Pavel Machek <pavel@ucw.cz>, Linus Walleij <linus.walleij@linaro.org>, Ard Biesheuvel <ardb@kernel.org>, Kees Cook <keescook@chromium.org>, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066710041915771?= X-GMAIL-MSGID: =?utf-8?q?1766066710041915771?= |
Series |
ARM: address -Wmissing-prototype warnings
|
|
Commit Message
Arnd Bergmann
May 16, 2023, 3:45 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> 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 <arnd@arndb.de> --- 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) {