[PATCH] drm/amdgpu: Fix unused amdgpu_acpi_get_numa_info function in amdgpu_acpi_get_node_id()

Lazar, Lijo Lijo.Lazar at amd.com
Fri May 19 13:10:40 UTC 2023


[AMD Official Use Only - General]

Thanks for the fix. Please use move the +#ifdef CONFIG_ACPI_NUMA up a bit to cover amdgpu_acpi_get_numa_size as well.

Thanks,
Lijo

-----Original Message-----
From: SHANMUGAM, SRINIVASAN <SRINIVASAN.SHANMUGAM at amd.com>
Sent: Friday, May 19, 2023 5:51 PM
To: Koenig, Christian <Christian.Koenig at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Tuikov, Luben <Luben.Tuikov at amd.com>; Lazar, Lijo <Lijo.Lazar at amd.com>
Cc: amd-gfx at lists.freedesktop.org; SHANMUGAM, SRINIVASAN <SRINIVASAN.SHANMUGAM at amd.com>
Subject: [PATCH] drm/amdgpu: Fix unused amdgpu_acpi_get_numa_info function in amdgpu_acpi_get_node_id()

Fix the below compiler complaining error:

drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:860:33: error: unused function 'amdgpu_acpi_get_numa_info' [-Werror,-Wunused-function] static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm)
                                ^
1 error generated.

By guarding amdgpu_acpi_get_numa_info function, only when CONFIG_ACPI_NUMA is enabled.

Cc: Christian König <christian.koenig at amd.com>
Cc: Lijo Lazar <lijo.lazar at amd.com>
Cc: Luben Tuikov <luben.tuikov at amd.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 7150c09933cf..9433596076d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -857,6 +857,7 @@ static inline uint64_t amdgpu_acpi_get_numa_size(int nid)
        return managed_pages * PAGE_SIZE;
 }

+#ifdef CONFIG_ACPI_NUMA
 static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm)  {
        struct amdgpu_numa_info *numa_info;
@@ -886,6 +887,7 @@ static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm)

        return numa_info;
 }
+#endif

 /**
  * amdgpu_acpi_get_node_id - obtain the NUMA node id for corresponding amdgpu
--
2.25.1



More information about the amd-gfx mailing list