From: Huang Rui <ray.huang@amd.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Felix.Kuehling@amd.com, alexander.deucher@amd.com,
christian.koenig@amd.com, airlied@linux.ie, daniel@ffwll.ch,
Yong.Zhao@amd.com, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] drm/amdkfd: Fix -Wunused-const-variable warning
Date: Thu, 10 Sep 2020 15:26:33 +0800 [thread overview]
Message-ID: <20200910072633.GE2472906@hr-amd> (raw)
In-Reply-To: <20200910025532.19616-1-yuehaibing@huawei.com>
On Thu, Sep 10, 2020 at 10:55:32AM +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 = {
> ^~~~~~~~~~~~~~~~~
>
> Move it to ifdef block.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
Raven already has the fallback path, so it should be out of IOMMU v2 flag.
You may want to move raven_device_info out of IOMMU v2 flag in kfd_supported_devices[][2] as well.
Thanks,
Ray
> 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
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&data=02%7C01%7Cray.huang%40amd.com%7Ce8805fd43e9a4ad33cd008d8555a567a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637353193795034052&sdata=HqUGjUpQtfCkZ3wA1%2F6HTCZrn%2F4%2BuQORTobzaIYa%2BNs%3D&reserved=0
next prev parent reply other threads:[~2020-09-10 7:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 2:55 [PATCH -next] drm/amdkfd: Fix -Wunused-const-variable warning YueHaibing
2020-09-10 7:26 ` Huang Rui [this message]
2020-09-10 7:50 ` [PATCH v2 " YueHaibing
2020-09-10 7:53 ` Huang Rui
2020-09-10 14:32 ` Felix Kuehling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200910072633.GE2472906@hr-amd \
--to=ray.huang@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=Yong.Zhao@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox