LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Amos Jianjun Kong <kongjianjun@gmail.com>
Cc: Yang Li <yang.lee@linux.alibaba.com>,
	Dave Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"Deucher, Alexander" <alexander.deucher@amd.com>,
	Christian Koenig <christian.koenig@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Maling list - DRI developers  <dri-devel@lists.freedesktop.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/amdkfd: fix resource_size.cocci warnings
Date: Mon, 27 Sep 2021 15:25:48 -0400	[thread overview]
Message-ID: <CADnq5_Oi15o3Ok8rDF19bTi_Nzw2mXaF-+v1oH0Ni4bS8pvfpw@mail.gmail.com> (raw)
In-Reply-To: <CAFeW=pYwkZ8=pVi9f-kHGwr-7Gb2OuWYd=LPzHt+yPWRP_gn8w@mail.gmail.com>

Applied.  Thanks!

Alex

On Sun, Sep 26, 2021 at 3:10 PM Amos Jianjun Kong <kongjianjun@gmail.com> wrote:
>
> On Sun, Sep 26, 2021 at 3:17 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
>>
>> Use resource_size function on resource object
>> instead of explicit computation.
>>
>> Clean up coccicheck warning:
>> ./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:905:10-13: ERROR: Missing
>> resource_size with res
>>
>> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
>> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
>> ---
>>  drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
>> index 4a16e3c..f53e17a 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
>> @@ -901,8 +901,7 @@ int svm_migrate_init(struct amdgpu_device *adev)
>>
>>                 /* Disable SVM support capability */
>>                 pgmap->type = 0;
>> -               devm_release_mem_region(adev->dev, res->start,
>> -                                       res->end - res->start + 1);
>> +               devm_release_mem_region(adev->dev, res->start, resource_size(res));
>
>
> Looks good.
> Reviewed-by: Amos Kong <kongjianjun@gmail.com>
>
>
>>
>>                 return PTR_ERR(r);
>>         }
>>
>> --
>> 1.8.3.1
>>

      parent reply	other threads:[~2021-09-27 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26  7:16 Yang Li
     [not found] ` <CAFeW=pYwkZ8=pVi9f-kHGwr-7Gb2OuWYd=LPzHt+yPWRP_gn8w@mail.gmail.com>
2021-09-27 19:25   ` Alex Deucher [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=CADnq5_Oi15o3Ok8rDF19bTi_Nzw2mXaF-+v1oH0Ni4bS8pvfpw@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=Felix.Kuehling@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=kongjianjun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yang.lee@linux.alibaba.com \
    --subject='Re: [PATCH] drm/amdkfd: fix resource_size.cocci warnings' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).