[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220203050421.39285-1-yang.lee@linux.alibaba.com>
Date: Thu, 3 Feb 2022 13:04:21 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: daniel@...ll.ch
Cc: airlied@...ux.ie, Xinhui.Pan@....com, christian.koenig@....com,
alexander.deucher@....com, Felix.Kuehling@....com,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH -next] drm/amdkfd: Fix resource_size.cocci warning
Use resource_size function on resource object instead of explicit
computation.
Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:978:11-14: ERROR: Missing
resource_size with res
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 8430f6475723..d4287a39be56 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -975,7 +975,7 @@ int svm_migrate_init(struct amdgpu_device *adev)
pgmap->type = 0;
if (pgmap->type == MEMORY_DEVICE_PRIVATE)
devm_release_mem_region(adev->dev, res->start,
- res->end - res->start + 1);
+ resource_size(res));
return PTR_ERR(r);
}
--
2.20.1.7.g153144c
Powered by blists - more mailing lists