[PATCH v1 2/8] drm/etnaviv: Using the unsigned int type to count the number of pages
Sui Jingfeng
sui.jingfeng at linux.dev
Fri Jun 23 10:08:16 UTC 2023
From: Sui Jingfeng <suijingfeng at loongson.cn>
Instead of the 'int' type in the etnaviv_gem_prime_get_sg_table(),
because the drm_prime_pages_to_sg() function takes an unsigned int type
as its third argument.
Signed-off-by: Sui Jingfeng <suijingfeng at loongson.cn>
---
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
index b003481adc2b..6a2129a92cb6 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
@@ -17,7 +17,7 @@ static struct lock_class_key etnaviv_prime_lock_class;
struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj)
{
struct etnaviv_gem_object *etnaviv_obj = to_etnaviv_bo(obj);
- int npages = obj->size >> PAGE_SHIFT;
+ unsigned int npages = obj->size >> PAGE_SHIFT;
if (WARN_ON(!etnaviv_obj->pages)) /* should have already pinned! */
return ERR_PTR(-EINVAL);
--
2.25.1
More information about the dri-devel
mailing list