From patchwork Mon May 22 11:50:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 97331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1386477vqo; Mon, 22 May 2023 04:52:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4wg/33C+P7spwI/r9ZUmjMdU5nugN33N8Bvpbe2bpBP5LrYjetUNgbqdMGNG6nSlzKWvyw X-Received: by 2002:a05:6a00:1816:b0:64c:ef3a:407f with SMTP id y22-20020a056a00181600b0064cef3a407fmr16124115pfa.29.1684756375866; Mon, 22 May 2023 04:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756375; cv=none; d=google.com; s=arc-20160816; b=Y5YI45Ybjo3jE91lxKzaFpisv8UCNFNnBs02wSRk98B3yt6XH0APPiArrwL6U5xRsY 5QGubv+7/nk9GWpLp7BLDZ5uUfyn7AmhmfIZDHEY2G7ChL328/PlOgGf83BGFFJYgsdv Cjyr/cKcM2y9dD/2hrIoK5WjurfCoTBnwruBc9MRf0ip/YXFbqrdoXvVkVZDDiAMm38T gVIFUJBauDWr0wxvUAa6K+SaUSch2OPixWjEGzyJyM+HKTvdC/017fGoTvBrxOslJkTg c4WEdcWGQw7gSTqP03/ELu2neNVPjXliAY/vJlpNdZJcgNBsaly84Jemf8saUJYtghwd 23uw== 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=Pmqi4P9BI6UlUyGcdgPdN7ZWTj3GQy8jHnmnExOSkxA=; b=ChQLzwU4x+jfJw++NlpeNHWaiVDpFLX+90+W6gJaZuNWQPLOzfqlP7mflMjWB9KyDS s7keplygrINvh5Z7s+Gr5W9nh/hApDfRvVaVlsuI4D7qJZilncW/ENtv5fyJQuJuUNfR Vqpo7qEEO+aNPiX4NQCUoGShzXz8RCmLZq80qTKJnvknexuaoi480MgiLKINJKYScq77 r9qecRhySl8eNhVUka2DauY5YeDTlp2Wiiarh8Cjj1AtQAsvsWJYyU8GPT+B6hg7YN9t eCyCB2sVbjopY1Wolxmf8hDypm2F3FKY8rRZxVkP2n3TEK+OP0aZSwzYgu1THXn/tex/ 750g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VTNepLXJ; 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 i9-20020aa796e9000000b0064d28b68d8fsi355383pfq.94.2023.05.22.04.52.41; Mon, 22 May 2023 04:52:55 -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=VTNepLXJ; 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 S233096AbjEVLwJ (ORCPT + 99 others); Mon, 22 May 2023 07:52:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbjEVLvs (ORCPT ); Mon, 22 May 2023 07:51:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E64FE6 for ; Mon, 22 May 2023 04:51:28 -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 204336179D for ; Mon, 22 May 2023 11:51:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3408BC4339C; Mon, 22 May 2023 11:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684756287; bh=wsmVaRXDTHdYbuzmc+ErLrw25ByhRTk9OeHIp7wng8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VTNepLXJ+mYAtmR4o5JKpUOvPO1eRVNdd7Bhp2iGfAJip1Q/5PSMSIx0CI+vW2Fp6 Vq/NmHzdGFrnK14KS8GQJrTGU+eG4+EdqOoELESOGtqfl+UPv5KMXTgjdxQ/iZkS5g E8ey02Rhx6A+T41wu2pPHqoRyIMJnbfEt7hfLkwEGfubolT3Wvjgk1cKzLQQjpWfyK Lu2KuvvISEEHKmhr2QpSpVcxQw12jCW5bmFlYtdp6bGb1SoKjW3SiD/Jfny61b9n5Z SpVkb8W7HZi266CLcAGhRx8GH1P9hlVZxTsYxOSTFnvzof4aoe9KXj8mjTtXppwN9v xac9IM03fxpYQ== From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Lijo Lazar , Le Ma Cc: Arnd Bergmann , Tim Huang , Mario Limonciello , Bokun Zhang , Jingyu Wang , Hans de Goede , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] drm/amdgpu: fix acpi build warnings Date: Mon, 22 May 2023 13:50:32 +0200 Message-Id: <20230522115047.1169839-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522115047.1169839-1-arnd@kernel.org> References: <20230522115047.1169839-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1766595101525738471?= X-GMAIL-MSGID: =?utf-8?q?1766595101525738471?= From: Arnd Bergmann Two newly introduced functions are in the global namespace but have no prototypes or callers outside of amdgpu_acpi.c, another function is static but only has a caller inside of an #ifdef: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:902:13: error: no previous prototype for 'amdgpu_acpi_get_node_id' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:928:30: error: no previous prototype for 'amdgpu_acpi_get_dev' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:860:33: error: 'amdgpu_acpi_get_numa_info' defined but not used [-Werror=unused-function] Avoid the warnings by marking all of them static and ensuring that the compiler is able to see the callsites. Fixes: c34db97b8217 ("drm/amdgpu: Add API to get numa information of XCC") Fixes: 1f6f659d06e1 ("drm/amdgpu: Store additional numa node information") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 873532c4adbe..1dbcd0e62478 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -899,13 +899,15 @@ static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm) * * Returns ACPI STATUS OK with Node ID on success or the corresponding failure reason */ -acpi_status amdgpu_acpi_get_node_id(acpi_handle handle, +static acpi_status amdgpu_acpi_get_node_id(acpi_handle handle, struct amdgpu_numa_info **numa_info) { -#ifdef CONFIG_ACPI_NUMA u64 pxm; acpi_status status; + if (!IS_ENABLED(CONFIG_ACPI_NUMA)) + return_ACPI_STATUS(AE_NOT_EXIST); + if (!numa_info) return_ACPI_STATUS(AE_ERROR); @@ -920,12 +922,9 @@ acpi_status amdgpu_acpi_get_node_id(acpi_handle handle, return_ACPI_STATUS(AE_ERROR); return_ACPI_STATUS(AE_OK); -#else - return_ACPI_STATUS(AE_NOT_EXIST); -#endif } -struct amdgpu_acpi_dev_info *amdgpu_acpi_get_dev(u16 bdf) +static struct amdgpu_acpi_dev_info *amdgpu_acpi_get_dev(u16 bdf) { struct amdgpu_acpi_dev_info *acpi_dev;