lkml.org 
[lkml]   [2020]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] media: vidtv: fix 32-bit warnings
Date
There are several warnings produced when the driver is built
for 32-bit archs. Solve them.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
drivers/media/test-drivers/vidtv/vidtv_common.c | 4 ++--
drivers/media/test-drivers/vidtv/vidtv_pes.c | 12 ++++++------
drivers/media/test-drivers/vidtv/vidtv_s302m.c | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/test-drivers/vidtv/vidtv_common.c b/drivers/media/test-drivers/vidtv/vidtv_common.c
index 9093df32e0ab..63b3055bd715 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_common.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_common.c
@@ -42,7 +42,7 @@ u32 vidtv_memcpy(void *to,
size_t len)
{
if (unlikely(to_offset + len > to_size)) {
- pr_err_ratelimited("overflow detected, skipping. Try increasing the buffer size. Needed %lu, had %zu\n",
+ pr_err_ratelimited("overflow detected, skipping. Try increasing the buffer size. Needed %zu, had %zu\n",
to_offset + len,
to_size);
return 0;
@@ -78,7 +78,7 @@ u32 vidtv_memset(void *to,
size_t len)
{
if (unlikely(to_offset + len > to_size)) {
- pr_err_ratelimited("overflow detected, skipping. Try increasing the buffer size. Needed %lu, had %zu\n",
+ pr_err_ratelimited("overflow detected, skipping. Try increasing the buffer size. Needed %zu, had %zu\n",
to_offset + len,
to_size);
return 0;
diff --git a/drivers/media/test-drivers/vidtv/vidtv_pes.c b/drivers/media/test-drivers/vidtv/vidtv_pes.c
index 8237434f3fc2..4ffc4a1c33ee 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_pes.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_pes.c
@@ -91,13 +91,13 @@ static u32 vidtv_pes_write_pts_dts(struct pes_header_write_args args)
return 0;

#ifdef __BIG_ENDIAN
- mask1 = GENMASK(30, 32);
- mask2 = GENMASK(15, 29);
- mask3 = GENMASK(0, 14);
+ mask1 = GENMASK_ULL(30, 32);
+ mask2 = GENMASK_ULL(15, 29);
+ mask3 = GENMASK_ULL(0, 14);
#else
- mask1 = GENMASK(32, 30);
- mask2 = GENMASK(29, 15);
- mask3 = GENMASK(14, 0);
+ mask1 = GENMASK_ULL(32, 30);
+ mask2 = GENMASK_ULL(29, 15);
+ mask3 = GENMASK_ULL(14, 0);
#endif

/* see ISO/IEC 13818-1 : 2000 p. 32 */
diff --git a/drivers/media/test-drivers/vidtv/vidtv_s302m.c b/drivers/media/test-drivers/vidtv/vidtv_s302m.c
index 467470295942..7cabc71b26e4 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_s302m.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_s302m.c
@@ -415,7 +415,7 @@ static void vidtv_s302m_write_frames(struct vidtv_encoder *e)
au->nbytes = nbytes_per_unit;

if (au_sz + sizeof(struct vidtv_smpte_s302m_es) != nbytes_per_unit) {
- pr_warn_ratelimited("write size was %d, expected %lu\n",
+ pr_warn_ratelimited("write size was %zu, expected %zu\n",
nbytes_per_unit,
au_sz + sizeof(struct vidtv_smpte_s302m_es));
}
--
2.26.2
\
 
 \ /
  Last update: 2020-09-12 11:24    [W:0.034 / U:2.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site