public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] drm/amdkfd: Fix -Wunused-const-variable warning
@ 2020-09-10  2:55 YueHaibing
  2020-09-10  7:26 ` Huang Rui
  2020-09-10  7:50 ` [PATCH v2 " YueHaibing
  0 siblings, 2 replies; 5+ messages in thread
From: YueHaibing @ 2020-09-10  2:55 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, airlied,
	daniel, Yong.Zhao
  Cc: amd-gfx, dri-devel, linux-kernel, YueHaibing

If KFD_SUPPORT_IOMMU_V2 is not set, gcc warns:

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device.c:121:37: warning: ‘raven_device_info’ defined but not used [-Wunused-const-variable=]
 static const struct kfd_device_info raven_device_info = {
                                     ^~~~~~~~~~~~~~~~~

Move it to ifdef block.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 0e71a0543f98..cae4df259e26 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -116,7 +116,6 @@ static const struct kfd_device_info carrizo_device_info = {
 	.num_xgmi_sdma_engines = 0,
 	.num_sdma_queues_per_engine = 2,
 };
-#endif
 
 static const struct kfd_device_info raven_device_info = {
 	.asic_family = CHIP_RAVEN,
@@ -135,6 +134,7 @@ static const struct kfd_device_info raven_device_info = {
 	.num_xgmi_sdma_engines = 0,
 	.num_sdma_queues_per_engine = 2,
 };
+#endif
 
 static const struct kfd_device_info hawaii_device_info = {
 	.asic_family = CHIP_HAWAII,
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-10 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-10  2:55 [PATCH -next] drm/amdkfd: Fix -Wunused-const-variable warning YueHaibing
2020-09-10  7:26 ` Huang Rui
2020-09-10  7:50 ` [PATCH v2 " YueHaibing
2020-09-10  7:53   ` Huang Rui
2020-09-10 14:32   ` Felix Kuehling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox