[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_Mg1BZ9PKHNtFdk4F2Ny7rQo8Tr2PA93MF-yF811d7EwA@mail.gmail.com>
Date: Mon, 22 May 2023 11:08:47 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Lijo Lazar <lijo.lazar@....com>, Le Ma <le.ma@....com>,
Tim Huang <tim.huang@....com>,
Jingyu Wang <jingyuwang_vip@....com>,
Arnd Bergmann <arnd@...db.de>,
Bokun Zhang <Bokun.Zhang@....com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
amd-gfx@...ts.freedesktop.org, Hans de Goede <hdegoede@...hat.com>,
Mario Limonciello <mario.limonciello@....com>
Subject: Re: [PATCH 5/5] drm/amdgpu: fix acpi build warnings
Applied the series. Thanks!
Alex
On Mon, May 22, 2023 at 7:51 AM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> 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 <arnd@...db.de>
> ---
> 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
>
Powered by blists - more mailing lists