From patchwork Tue May 16 16:06:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94804 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp549886vqo; Tue, 16 May 2023 09:20:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6YG/oXH6ufWe2sOox3i71UZfKj2Iyxu2x3bhVevAsliGeomI21N8kgsjfKwAJ5LsaojmNa X-Received: by 2002:a17:90b:b85:b0:24b:a5b6:e866 with SMTP id bd5-20020a17090b0b8500b0024ba5b6e866mr39286727pjb.24.1684254052398; Tue, 16 May 2023 09:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684254052; cv=none; d=google.com; s=arc-20160816; b=eneyvQLJa2l1bxfy1zRysL4SjZilIi+8YM5Lbzn4zIkykj2HfmsCELs/l7kgilDGDX PUK1xY6x536zy+AveTmOBPazRg1SfOAxy2Cg47syAuituyvMop38I7IAkxxbfNfEnAcl CpYx1/C1qxCCZgUtgiN2CnjsJh8rz5XHULFmQ3almjDFHZQXg5SDg1XBqjN1VCOFycm2 mhmz5tHXiDw2YernY8RmDHT510/1Y4J7hXapIpxiKqZqWej5sxcfB0zricyTNnXChJmy JD3pqXzgPfS0TwNXg0tXSvJ0JbdLx203miVwnR4b07kxUzzlltvvpUMOhfnt+3+/BHyO /pUQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j190-20020a638bc7000000b00528519a4371si18812769pge.516.2023.05.16.09.20.39; Tue, 16 May 2023 09:20:52 -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 S234457AbjEPQIL (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766068377269433139?= X-GMAIL-MSGID: =?utf-8?q?1766068377269433139?= 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) {