[PATCH] drm/amdgpu: Mark amdgpu_acpi_get_node_id & amdgpu_acpi_get_dev functions as static

Alex Deucher alexdeucher at gmail.com
Tue May 23 13:47:57 UTC 2023


On Tue, May 23, 2023 at 6:17 AM Srinivasan Shanmugam
<srinivasan.shanmugam at amd.com> wrote:
>
> Below two functions cause a warning because they lack a prototype:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:904:13: warning: no previous prototype for ‘amdgpu_acpi_get_node_id’ [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:930:30: warning: no previous prototype for ‘amdgpu_acpi_get_dev’ [-Wmissing-prototypes]
>
> There are no callers from other files, so just mark them as 'static'.
>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>

Arnd sent a similar patch yesterday.  Already queued up.

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 1a66febf6981..82653f8496bc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -901,8 +901,8 @@ 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,
> -                                   struct amdgpu_numa_info **numa_info)
> +static acpi_status amdgpu_acpi_get_node_id(acpi_handle handle,
> +                                          struct amdgpu_numa_info **numa_info)
>  {
>  #ifdef CONFIG_ACPI_NUMA
>         u64 pxm;
> @@ -927,7 +927,7 @@ acpi_status amdgpu_acpi_get_node_id(acpi_handle handle,
>  #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.25.1
>


More information about the amd-gfx mailing list