diff mbox series

media: staging: allegro: cleanup two warnings

Message ID 5a433fccafc73e1361f65c4423b0099bbd18f67f.1559137474.git.mchehab+samsung@kernel.org (mailing list archive)
State New, archived
Headers show
Series media: staging: allegro: cleanup two warnings | expand

Commit Message

Mauro Carvalho Chehab May 29, 2019, 1:44 p.m. UTC
Sparse complains about two issues when building with i386
and COMPILE_TEST:

	drivers/staging/media/allegro-dvt/allegro-core.c:1849:36: warning: constant 0xffffffff00000000UL is so big it is unsigned long long
	drivers/staging/media/allegro-dvt/allegro-core.c:865:24: error: incompatible types in comparison expression (different type sizes)

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/staging/media/allegro-dvt/allegro-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/staging/media/allegro-dvt/allegro-core.c b/drivers/staging/media/allegro-dvt/allegro-core.c
index d007d1778f0e..20b38b737869 100644
--- a/drivers/staging/media/allegro-dvt/allegro-core.c
+++ b/drivers/staging/media/allegro-dvt/allegro-core.c
@@ -863,7 +863,7 @@  static ssize_t allegro_mbox_read(struct allegro_dev *dev,
 	 * Skip the header, as was already read to get the size of the body.
 	 */
 	body_no_wrap = min((size_t)header->length,
-			   (mbox->size - (head + sizeof(*header))));
+			   (size_t)(mbox->size - (head + sizeof(*header))));
 	regmap_bulk_read(dev->sram, mbox->data + head + sizeof(*header),
 			 dst + sizeof(*header), body_no_wrap / 4);
 	regmap_bulk_read(dev->sram, mbox->data,
@@ -1846,7 +1846,7 @@  static void allegro_copy_fw_codec(struct allegro_dev *dev,
 		     lower_32_bits(icache_offset));
 
 	dcache_offset =
-	    (dev->firmware.paddr & 0xffffffff00000000UL) - MCU_CACHE_OFFSET;
+	    (dev->firmware.paddr & 0xffffffff00000000ULL) - MCU_CACHE_OFFSET;
 	v4l2_dbg(2, debug, &dev->v4l2_dev,
 		 "dcache_offset: msb = 0x%x, lsb = 0x%x\n",
 		 upper_32_bits(dcache_offset), lower_32_bits(dcache_offset));