public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Jing Xiangfeng <jingxiangfeng@huawei.com>,
	ray.huang@amd.com, airlied@linux.ie, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/ttm: remove redundant initialization of variable ret
Date: Thu, 17 Sep 2020 13:56:09 +0200	[thread overview]
Message-ID: <d7d1403a-acdb-e823-e7ba-e973860e3e4b@amd.com> (raw)
In-Reply-To: <20200917114246.93291-1-jingxiangfeng@huawei.com>

Am 17.09.20 um 13:42 schrieb Jing Xiangfeng:
> The variable ret is being initialized with '-ENOMEM' that is
> meaningless. So remove it.
>
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>

Stumbled over the same thing just a few days ago, so this is already 
fixed in my branch.

> ---
>   drivers/gpu/drm/ttm/ttm_tt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index 3437711ddb43..4db87b9b57a8 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -388,7 +388,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
>   	struct page *from_page;
>   	struct page *to_page;
>   	int i;
> -	int ret = -ENOMEM;
> +	int ret;
>   
>   	BUG_ON(ttm->state != tt_unbound && ttm->state != tt_unpopulated);
>   	BUG_ON(ttm->caching_state != tt_cached);


      reply	other threads:[~2020-09-17 11:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 11:42 [PATCH] drm/ttm: remove redundant initialization of variable ret Jing Xiangfeng
2020-09-17 11:56 ` Christian König [this message]

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=d7d1403a-acdb-e823-e7ba-e973860e3e4b@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingxiangfeng@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray.huang@amd.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