AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Tom Rix <trix@redhat.com>,
	alexander.deucher@amd.com, Xinhui.Pan@amd.com,
	 airlied@gmail.com, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/radeon: remove unused variable rbo
Date: Tue, 14 Mar 2023 14:08:09 +0100	[thread overview]
Message-ID: <b14b8827-7d09-c37e-0548-a30b14ffe64f@amd.com> (raw)
In-Reply-To: <20230314130616.2170856-1-trix@redhat.com>

Am 14.03.23 um 14:06 schrieb Tom Rix:
> gcc with W=1 reports this error
> drivers/gpu/drm/radeon/radeon_ttm.c:201:27: error:
>    variable ‘rbo’ set but not used [-Werror=unused-but-set-variable]
>    201 |         struct radeon_bo *rbo;
>        |                           ^~~
>
> rbo use was removed with
> commit f87c1f0b7b79 ("drm/ttm: prevent moving of pinned BOs")
> Since the variable is not used, remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/radeon/radeon_ttm.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 2220cdf6a3f6..0ea430ee5256 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -198,7 +198,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
>   {
>   	struct ttm_resource *old_mem = bo->resource;
>   	struct radeon_device *rdev;
> -	struct radeon_bo *rbo;
>   	int r;
>   
>   	if (new_mem->mem_type == TTM_PL_TT) {
> @@ -211,7 +210,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
>   	if (r)
>   		return r;
>   
> -	rbo = container_of(bo, struct radeon_bo, tbo);
>   	rdev = radeon_get_rdev(bo->bdev);
>   	if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
>   			 bo->ttm == NULL)) {


  reply	other threads:[~2023-03-14 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 13:06 [PATCH] drm/radeon: remove unused variable rbo Tom Rix
2023-03-14 13:08 ` Christian König [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-05-25 21:00 Tom Rix

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=b14b8827-7d09-c37e-0548-a30b14ffe64f@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --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=trix@redhat.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