From: Thierry Reding Date: Wed, 4 Jun 2014 07:18:29 +0000 (+0200) Subject: drm/prime: Use unsigned type for number of pages X-Git-Tag: omap-for-v3.20/drop-legacy-3517~77^2~62^2~4 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34eab43ed2483e69bc79fd2e3aaf5adfae771907;p=pandora-kernel.git drm/prime: Use unsigned type for number of pages The number of pages can never be negative, so an unsigned type is enough. This also matches the type of the n_pages argument of the sg_alloc_table_from_pages() function. Signed-off-by: Thierry Reding --- diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index 78ca30808422..e15882fd45a3 100644 --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu/drm/drm_prime.c @@ -669,7 +669,7 @@ int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data, * the driver is responsible for mapping the pages into the * importers address space for use with dma_buf itself. */ -struct sg_table *drm_prime_pages_to_sg(struct page **pages, int nr_pages) +struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages) { struct sg_table *sg = NULL; int ret; Reading git-diff-tree failed