]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/etnaviv: Use 'unsigned' type to count the number of pages
authorSui Jingfeng <sui.jingfeng@linux.dev>
Sun, 8 Sep 2024 12:11:04 +0000 (20:11 +0800)
committerLucas Stach <l.stach@pengutronix.de>
Mon, 28 Oct 2024 15:30:15 +0000 (16:30 +0100)
commitc82e8b292c2a2a4e780677af895c6233ef5538b2
treee261353c238243f0222951dbd4785cac8fc8c060
parent56257d4c422d0f45b1367145ffe1a1350d4338b6
drm/etnaviv: Use 'unsigned' type to count the number of pages

The unpin_user_pages() function takes an 'unsigned long' argument to
store the number of userspace pages, and the struct drm_gem_object::size
is a size_t type. The number of pages can not be negative, hence, use
'unsigned' variable to count the number of pages.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gem.c