Re: [PATCH] media: vidtv: fix 32-bit warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux