summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-01 11:09:26 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-03 11:12:20 +0200
commit1faa39e0f3bcfe47dc7a61a72c234b24005c3a1a (patch)
tree688ee715a24d2ad611c5c1217f0a376d20695bcf /include/media
parent73c016543dbad406443d413f9c25fac32dcf5131 (diff)
downloadlinux-1faa39e0f3bcfe47dc7a61a72c234b24005c3a1a.tar.bz2
media: videobuf-dma-sg: number of pages should be unsigned long
As reported by smatch: drivers/media/v4l2-core/videobuf-dma-sg.c:245 videobuf_dma_init_kernel() warn: should 'nr_pages << 12' be a 64 bit type? The printk should not be using %d for the number of pages. After looking better, the real problem here is that the number of pages should be long int. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf-dma-sg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h
index 34450f7ad510..930ff8d454fc 100644
--- a/include/media/videobuf-dma-sg.h
+++ b/include/media/videobuf-dma-sg.h
@@ -60,7 +60,7 @@ struct videobuf_dmabuf {
/* common */
struct scatterlist *sglist;
int sglen;
- int nr_pages;
+ unsigned long nr_pages;
int direction;
};