Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp926417rwd; Tue, 16 May 2023 09:20:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xEIIP5L/gQEgNp3a1nMqg5IzEv4IgWSZluVd7nOJTN18Kg7meRKK5u0g+eQU0xXkSBLv4 X-Received: by 2002:a17:902:d48e:b0:1ae:4ca9:dc14 with SMTP id c14-20020a170902d48e00b001ae4ca9dc14mr505521plg.27.1684254026085; Tue, 16 May 2023 09:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684254026; cv=none; d=google.com; s=arc-20160816; b=vaJvwP5QVy1p/v4OFEBtcYRF/qPoYFXseK+6X4R3bjcldbeywOXfA7/d1LIRwhsjg4 FGZKwSaG7sPrBnasjDJKvweEtDOYWsW0vC95rY1jizhZwR01d5YgeJzClt/P5gv/u5wg lSCUweU783/Hc8BOUXdJgSb6nbrI9yty3JCLVWJtbE5CyvnlUU+I5dIzkSl5uGt95Q1O xzRSlvZFUSOwqZsbn0zaQyqpejN/jza340Vt1pVClOWms35fa7Tz2m+0U6LLTAuEu3uO /yZIu0wbWTzkpS/YJFjb/fXXByxC7Z1OXcaKI8M6SIyHJFC5OBf4TCNEajumCT/EZdy+ nA6w== 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=S/ga8+lG2nCV/xhsqusMdsCcRrjLXMxRzT2GkNSfTNc=; b=Hc6cy9ibJjBHsFkUq5NnR14wXe/T1lir7RytMJSKO1qDEDB3/d+7Lv2zNxrvBeq+EM zY+byVTQ/t/jQxNL9yqr0h9kuh5ivn3w1ch4oMOlz1MeOJ2Zd3TwHlvZqsG+DA5sX5WU Y8NHnq0LPW88iXY5Z+iDZA/mcT96aNNqDYiRXWueQXvp465zO8xdnQoLzIYzfZ7e9Ka2 jZuY9nB57y5fUdB3BGoJOkH4JFmEHRUEPgZF1SXH/s6BAKvwFugU9emL854iN5g04xEU uJVOzc6i/4FWhVAp/yfCNG2pQ66t3cw1tXlh57zw0jNyvdHymXQkgazM/qa26jnP1V53 /5zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cVh/kACF"; 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 q13-20020a170902bd8d00b001a6b5a7db52si18070465pls.596.2023.05.16.09.20.13; Tue, 16 May 2023 09:20:26 -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="cVh/kACF"; 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 S234451AbjEPQIL (ORCPT + 99 others); Tue, 16 May 2023 12:08:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234468AbjEPQIA (ORCPT ); Tue, 16 May 2023 12:08:00 -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 055E09034; Tue, 16 May 2023 09:07:36 -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 7417063BF6; Tue, 16 May 2023 16:07:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43964C433A0; Tue, 16 May 2023 16:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684253252; bh=WPczk00OnpL1jBgj+JlXAzNsUnny+CNOuArcW/QKCBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cVh/kACFXxSUhb2GvaZfJcYCsV1OAcUsDa98Md9OyqxoBN+DV6mSHnef4tb8cixO2 gctazSfuTB4U8OHHKFglnRncd2qHo7IKswAfvrilK3P8jow5hWJwoRev7xYNuzQ3AS ZVmT+yj39izt3BQcn/afpHMkoaz90Jgdg0SB2WK5U7FDNaKIcGwoYYbIG11X9c2MfF nQ+0QxwCWv0yg39Imc0JuzbkEXe9NZrud6M2QpVT0w14kMd3JteIQs+wjspdKbwQ0O jECfT/apdnuJVxrW+H9HlclqHlvGQj1KNdHnCQcMNeTQm55JmNsoGR686m4AEbv0zY kP31/f3NcVtfA== From: Arnd Bergmann To: Catalin Marinas , Will Deacon Cc: Arnd Bergmann , Ard Biesheuvel , Mark Rutland , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Anshuman Khandual , Kees Cook , Suren Baghdasaryan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, kvmarm@lists.linux.dev Subject: [PATCH 09/15] arm64: hide unused is_valid_bugaddr() Date: Tue, 16 May 2023 18:06:36 +0200 Message-Id: <20230516160642.523862-10-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516160642.523862-1-arnd@kernel.org> References: <20230516160642.523862-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 When generic BUG() support is disabled, this function has no declaration and no callers but causes a W=1 warning: arch/arm64/kernel/traps.c:950:5: error: no previous prototype for 'is_valid_bugaddr' [-Werror=missing-prototypes] Add an #ifdef that matches the one around the declaration. Signed-off-by: Arnd Bergmann --- arch/arm64/kernel/traps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 98898c3108b8..3f5a21e5968e 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -946,7 +946,7 @@ void do_serror(struct pt_regs *regs, unsigned long esr) } /* GENERIC_BUG traps */ - +#ifdef CONFIG_GENERIC_BUG int is_valid_bugaddr(unsigned long addr) { /* @@ -958,6 +958,7 @@ int is_valid_bugaddr(unsigned long addr) */ return 1; } +#endif static int bug_handler(struct pt_regs *regs, unsigned long esr) { -- 2.39.2