* [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning
@ 2020-09-10 7:50 ` YueHaibing
0 siblings, 0 replies; 15+ messages in thread
From: YueHaibing @ 2020-09-10 7:50 UTC (permalink / raw)
To: Felix.Kuehling, alexander.deucher, christian.koenig, airlied,
daniel, Yong.Zhao, ray.huang
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 = {
^~~~~~~~~~~~~~~~~
As Huang Rui suggested, Raven already has the fallback path,
so it should be out of IOMMU v2 flag.
Suggested-by: Huang Rui <ray.huang@amd.com>
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..e3fc6ed7b79c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -503,8 +503,8 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
#ifdef KFD_SUPPORT_IOMMU_V2
[CHIP_KAVERI] = {&kaveri_device_info, NULL},
[CHIP_CARRIZO] = {&carrizo_device_info, NULL},
- [CHIP_RAVEN] = {&raven_device_info, NULL},
#endif
+ [CHIP_RAVEN] = {&raven_device_info, NULL},
[CHIP_HAWAII] = {&hawaii_device_info, NULL},
[CHIP_TONGA] = {&tonga_device_info, NULL},
[CHIP_FIJI] = {&fiji_device_info, &fiji_vf_device_info},
--
2.17.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning
@ 2020-09-10 7:50 ` YueHaibing
0 siblings, 0 replies; 15+ messages in thread
From: YueHaibing @ 2020-09-10 7:50 UTC (permalink / raw)
To: Felix.Kuehling, alexander.deucher, christian.koenig, airlied,
daniel, Yong.Zhao, ray.huang
Cc: YueHaibing, dri-devel, amd-gfx, linux-kernel
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 = {
^~~~~~~~~~~~~~~~~
As Huang Rui suggested, Raven already has the fallback path,
so it should be out of IOMMU v2 flag.
Suggested-by: Huang Rui <ray.huang@amd.com>
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..e3fc6ed7b79c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -503,8 +503,8 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
#ifdef KFD_SUPPORT_IOMMU_V2
[CHIP_KAVERI] = {&kaveri_device_info, NULL},
[CHIP_CARRIZO] = {&carrizo_device_info, NULL},
- [CHIP_RAVEN] = {&raven_device_info, NULL},
#endif
+ [CHIP_RAVEN] = {&raven_device_info, NULL},
[CHIP_HAWAII] = {&hawaii_device_info, NULL},
[CHIP_TONGA] = {&tonga_device_info, NULL},
[CHIP_FIJI] = {&fiji_device_info, &fiji_vf_device_info},
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning
2020-09-10 7:50 ` YueHaibing
(?)
@ 2020-09-10 7:53 ` Huang Rui
-1 siblings, 0 replies; 15+ messages in thread
From: Huang Rui @ 2020-09-10 7:53 UTC (permalink / raw)
To: YueHaibing
Cc: Yong.Zhao@amd.com, airlied@linux.ie, Kuehling, Felix,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, daniel@ffwll.ch,
Deucher, Alexander, Koenig, Christian
On Thu, Sep 10, 2020 at 03:50:06PM +0800, YueHaibing wrote:
> 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 = {
> ^~~~~~~~~~~~~~~~~
>
> As Huang Rui suggested, Raven already has the fallback path,
> so it should be out of IOMMU v2 flag.
>
> Suggested-by: Huang Rui <ray.huang@amd.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Huang Rui <ray.huang@amd.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..e3fc6ed7b79c 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -503,8 +503,8 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
> #ifdef KFD_SUPPORT_IOMMU_V2
> [CHIP_KAVERI] = {&kaveri_device_info, NULL},
> [CHIP_CARRIZO] = {&carrizo_device_info, NULL},
> - [CHIP_RAVEN] = {&raven_device_info, NULL},
> #endif
> + [CHIP_RAVEN] = {&raven_device_info, NULL},
> [CHIP_HAWAII] = {&hawaii_device_info, NULL},
> [CHIP_TONGA] = {&tonga_device_info, NULL},
> [CHIP_FIJI] = {&fiji_device_info, &fiji_vf_device_info},
> --
> 2.17.1
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning
@ 2020-09-10 7:53 ` Huang Rui
0 siblings, 0 replies; 15+ messages in thread
From: Huang Rui @ 2020-09-10 7:53 UTC (permalink / raw)
To: YueHaibing
Cc: Kuehling, Felix, Deucher, Alexander, Koenig, Christian,
airlied@linux.ie, daniel@ffwll.ch, Yong.Zhao@amd.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
On Thu, Sep 10, 2020 at 03:50:06PM +0800, YueHaibing wrote:
> 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 = {
> ^~~~~~~~~~~~~~~~~
>
> As Huang Rui suggested, Raven already has the fallback path,
> so it should be out of IOMMU v2 flag.
>
> Suggested-by: Huang Rui <ray.huang@amd.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Huang Rui <ray.huang@amd.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..e3fc6ed7b79c 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -503,8 +503,8 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
> #ifdef KFD_SUPPORT_IOMMU_V2
> [CHIP_KAVERI] = {&kaveri_device_info, NULL},
> [CHIP_CARRIZO] = {&carrizo_device_info, NULL},
> - [CHIP_RAVEN] = {&raven_device_info, NULL},
> #endif
> + [CHIP_RAVEN] = {&raven_device_info, NULL},
> [CHIP_HAWAII] = {&hawaii_device_info, NULL},
> [CHIP_TONGA] = {&tonga_device_info, NULL},
> [CHIP_FIJI] = {&fiji_device_info, &fiji_vf_device_info},
> --
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning
@ 2020-09-10 7:53 ` Huang Rui
0 siblings, 0 replies; 15+ messages in thread
From: Huang Rui @ 2020-09-10 7:53 UTC (permalink / raw)
To: YueHaibing
Cc: Yong.Zhao@amd.com, airlied@linux.ie, Kuehling, Felix,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, Deucher, Alexander,
Koenig, Christian
On Thu, Sep 10, 2020 at 03:50:06PM +0800, YueHaibing wrote:
> 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 = {
> ^~~~~~~~~~~~~~~~~
>
> As Huang Rui suggested, Raven already has the fallback path,
> so it should be out of IOMMU v2 flag.
>
> Suggested-by: Huang Rui <ray.huang@amd.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Huang Rui <ray.huang@amd.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..e3fc6ed7b79c 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -503,8 +503,8 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
> #ifdef KFD_SUPPORT_IOMMU_V2
> [CHIP_KAVERI] = {&kaveri_device_info, NULL},
> [CHIP_CARRIZO] = {&carrizo_device_info, NULL},
> - [CHIP_RAVEN] = {&raven_device_info, NULL},
> #endif
> + [CHIP_RAVEN] = {&raven_device_info, NULL},
> [CHIP_HAWAII] = {&hawaii_device_info, NULL},
> [CHIP_TONGA] = {&tonga_device_info, NULL},
> [CHIP_FIJI] = {&fiji_device_info, &fiji_vf_device_info},
> --
> 2.17.1
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning
2020-09-10 7:50 ` YueHaibing
(?)
@ 2020-09-10 14:32 ` Felix Kuehling
-1 siblings, 0 replies; 15+ messages in thread
From: Felix Kuehling @ 2020-09-10 14:32 UTC (permalink / raw)
To: YueHaibing, alexander.deucher, christian.koenig, airlied, daniel,
Yong.Zhao, ray.huang
Cc: dri-devel, amd-gfx, linux-kernel
Am 2020-09-10 um 3:50 a.m. schrieb 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 = {
> ^~~~~~~~~~~~~~~~~
>
> As Huang Rui suggested, Raven already has the fallback path,
> so it should be out of IOMMU v2 flag.
>
> Suggested-by: Huang Rui <ray.huang@amd.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
I applied your patch to the amd-staging-drm-next branch.
Thank you,
Felix
> ---
> 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..e3fc6ed7b79c 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -503,8 +503,8 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
> #ifdef KFD_SUPPORT_IOMMU_V2
> [CHIP_KAVERI] = {&kaveri_device_info, NULL},
> [CHIP_CARRIZO] = {&carrizo_device_info, NULL},
> - [CHIP_RAVEN] = {&raven_device_info, NULL},
> #endif
> + [CHIP_RAVEN] = {&raven_device_info, NULL},
> [CHIP_HAWAII] = {&hawaii_device_info, NULL},
> [CHIP_TONGA] = {&tonga_device_info, NULL},
> [CHIP_FIJI] = {&fiji_device_info, &fiji_vf_device_info},
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning
@ 2020-09-10 14:32 ` Felix Kuehling
0 siblings, 0 replies; 15+ messages in thread
From: Felix Kuehling @ 2020-09-10 14:32 UTC (permalink / raw)
To: YueHaibing, alexander.deucher, christian.koenig, airlied, daniel,
Yong.Zhao, ray.huang
Cc: amd-gfx, dri-devel, linux-kernel
Am 2020-09-10 um 3:50 a.m. schrieb 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 = {
> ^~~~~~~~~~~~~~~~~
>
> As Huang Rui suggested, Raven already has the fallback path,
> so it should be out of IOMMU v2 flag.
>
> Suggested-by: Huang Rui <ray.huang@amd.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
I applied your patch to the amd-staging-drm-next branch.
Thank you,
Felix
> ---
> 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..e3fc6ed7b79c 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -503,8 +503,8 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
> #ifdef KFD_SUPPORT_IOMMU_V2
> [CHIP_KAVERI] = {&kaveri_device_info, NULL},
> [CHIP_CARRIZO] = {&carrizo_device_info, NULL},
> - [CHIP_RAVEN] = {&raven_device_info, NULL},
> #endif
> + [CHIP_RAVEN] = {&raven_device_info, NULL},
> [CHIP_HAWAII] = {&hawaii_device_info, NULL},
> [CHIP_TONGA] = {&tonga_device_info, NULL},
> [CHIP_FIJI] = {&fiji_device_info, &fiji_vf_device_info},
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning
@ 2020-09-10 14:32 ` Felix Kuehling
0 siblings, 0 replies; 15+ messages in thread
From: Felix Kuehling @ 2020-09-10 14:32 UTC (permalink / raw)
To: YueHaibing, alexander.deucher, christian.koenig, airlied, daniel,
Yong.Zhao, ray.huang
Cc: dri-devel, amd-gfx, linux-kernel
Am 2020-09-10 um 3:50 a.m. schrieb 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 = {
> ^~~~~~~~~~~~~~~~~
>
> As Huang Rui suggested, Raven already has the fallback path,
> so it should be out of IOMMU v2 flag.
>
> Suggested-by: Huang Rui <ray.huang@amd.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
I applied your patch to the amd-staging-drm-next branch.
Thank you,
Felix
> ---
> 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..e3fc6ed7b79c 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -503,8 +503,8 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
> #ifdef KFD_SUPPORT_IOMMU_V2
> [CHIP_KAVERI] = {&kaveri_device_info, NULL},
> [CHIP_CARRIZO] = {&carrizo_device_info, NULL},
> - [CHIP_RAVEN] = {&raven_device_info, NULL},
> #endif
> + [CHIP_RAVEN] = {&raven_device_info, NULL},
> [CHIP_HAWAII] = {&hawaii_device_info, NULL},
> [CHIP_TONGA] = {&tonga_device_info, NULL},
> [CHIP_FIJI] = {&fiji_device_info, &fiji_vf_device_info},
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread