mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH] media: vidtv: fix 32-bit warnings
Date: Sat, 12 Sep 2020 12:51:44 -0700	[thread overview]
Message-ID: <4bf9b441669e98fc2d055c063460c79175bdf685.camel@perches.com> (raw)
In-Reply-To: <008267108695f5cdf6744d861b2b6e5084bedfee.1599902564.git.mchehab+huawei@kernel.org>

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.



      reply	other threads:[~2020-09-12 19:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12  9:22 Mauro Carvalho Chehab
2020-09-12 19:51 ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bf9b441669e98fc2d055c063460c79175bdf685.camel@perches.com \
    --to=joe@perches.com \
    --cc=dwlsalmeida@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®