From: "Christian König" <christian.koenig@amd.com>
To: YueHaibing <yuehaibing@huawei.com>,
alexander.deucher@amd.com, airlied@linux.ie, daniel@ffwll.ch
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] drm/ttm/agp: Fix Wunused-variable warning
Date: Thu, 10 Sep 2020 10:56:05 +0200 [thread overview]
Message-ID: <1226ea65-a957-baa2-e9c7-fe88b1aae620@amd.com> (raw)
In-Reply-To: <20200910023345.20428-1-yuehaibing@huawei.com>
Am 10.09.20 um 04:33 schrieb YueHaibing:
> If CONFIG_AGP is not set, gcc warns:
>
> drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
> drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
> struct radeon_device *rdev = radeon_get_rdev(bdev);
> ^~~~
>
> Move it to ifdef block to fix this.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 31c63d339629..449e77eb75f9 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
> struct ttm_tt *ttm,
> struct ttm_resource *bo_mem)
> {
> +#if IS_ENABLED(CONFIG_AGP)
> struct radeon_device *rdev = radeon_get_rdev(bdev);
>
> -#if IS_ENABLED(CONFIG_AGP)
> if (rdev->flags & RADEON_IS_AGP)
> return ttm_agp_bind(ttm, bo_mem);
> #endif
next prev parent reply other threads:[~2020-09-10 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 2:33 YueHaibing
2020-09-10 8:56 ` Christian König [this message]
2020-09-15 19:28 ` Alex Deucher
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=1226ea65-a957-baa2-e9c7-fe88b1aae620@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--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
Powered by JetHome