[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190705053037.GC8621@kroah.com>
Date: Fri, 5 Jul 2019 07:30:37 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Luke Nowakowski-Krijger <lnowakow@....ucsd.edu>
Cc: mchehab@...nel.org, linux-kernel-mentees@...ts.linuxfoundation.org,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Subject: Re: [Linux-kernel-mentees] [Linux-kernel-mentee, PATCH] media:
dvb_frontend.h: Fix shifting signed 32-bit value problem
On Thu, Jul 04, 2019 at 10:04:22AM -0700, Luke Nowakowski-Krijger wrote:
> Fix DVBFE_ALGO_RECOVERY and DVBFE_ALGO_SEARCH_ERROR to use U cast which
> fixes undefined behavior error by certain compilers.
>
> Signed-off-by: Luke Nowakowski-Krijger <lnowakow@....ucsd.edu>
> ---
> include/media/dvb_frontend.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/media/dvb_frontend.h b/include/media/dvb_frontend.h
> index f05cd7b94a2c..472fe5871d94 100644
> --- a/include/media/dvb_frontend.h
> +++ b/include/media/dvb_frontend.h
> @@ -144,7 +144,7 @@ enum dvbfe_algo {
> DVBFE_ALGO_HW = (1 << 0),
> DVBFE_ALGO_SW = (1 << 1),
> DVBFE_ALGO_CUSTOM = (1 << 2),
> - DVBFE_ALGO_RECOVERY = (1 << 31)
> + DVBFE_ALGO_RECOVERY = (1U << 31)
BIT() is better for stuff like this.
thanks,
greg k-h
Powered by blists - more mailing lists