[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4bf9b441669e98fc2d055c063460c79175bdf685.camel@perches.com>
Date: Sat, 12 Sep 2020 12:51:44 -0700
From: Joe Perches <joe@...ches.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: "Daniel W. S. Almeida" <dwlsalmeida@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
Hans Verkuil <hverkuil@...all.nl>
Subject: Re: [PATCH] media: vidtv: fix 32-bit warnings
On Sat, 2020-09-12 at 11:22 +0200, Mauro Carvalho Chehab wrote:
> There are several warnings produced when the driver is built
> for 32-bit archs. Solve them.
[]
> diff --git a/drivers/media/test-drivers/vidtv/vidtv_common.c b/drivers/media/test-drivers/vidtv/vidtv_common.c
[]
> diff --git 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);
These are broken as GENMASK_ULL takes arguments
in high then low order.
> #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
The #ifdef can be removed instead.
Powered by blists - more mailing lists