Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2811205rwd; Mon, 22 May 2023 04:52:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6IFvShyYgu8SKeVsaP9HzmaUfPm4VSWGgk5wSkT0psXi4FJldejVeslvwCjNHQ0W8xFqRq X-Received: by 2002:a05:6a00:2445:b0:63b:7fc0:a4af with SMTP id d5-20020a056a00244500b0063b7fc0a4afmr12188216pfj.26.1684756374234; Mon, 22 May 2023 04:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756374; cv=none; d=google.com; s=arc-20160816; b=vplwze6xbBF9fuzdaNK+GuhBgEBbrpli74b9ni15VveAiZXxLycl7pFwX3ym7m/THm K/fz9eH4ursOFclYgqarCWqIbLchFr24HOk6wTwKrLOenlxm+4+fvpteaQWRqXvj90/7 5smtoKsv4Ih4dlH2I8XMgqEDiHo5eAQMRx19g/b06XhyMsCKFqSCZYunblUCoh4hBuqZ HNS3+D9sZwE9aK89bHl96JHrNi76FMNoiUvNC0XJ12MGTlC4RvW/avKuzk8tZHtkiUDz KWPhVTMqgK9NOoQ0FJ6+coXTPbAUyVIADCqLqecwWgP6L2NruFix3BJAiYmb0s8gitRH uE2A== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a626105000000b0063d61f05a8fsi4533373pfb.198.2023.05.22.04.52.40; Mon, 22 May 2023 04:52:54 -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 S232823AbjEVLwI (ORCPT + 99 others); Mon, 22 May 2023 07:52:08 -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=20K=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 Content-Transfer-Encoding: 8bit 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 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; -- 2.39.2