From: Benoit Parrot <bparrot@ti•com>
To: Mauro Carvalho Chehab <mchehab+samsung@kernel•org>
Cc: Kate Stewart <kstewart@linuxfoundation•org>,
Richard Fontana <rfontana@redhat•com>,
"Lad, Prabhakar" <prabhakar.csengg@gmail•com>,
Thierry Reding <thierry.reding@gmail•com>,
Bluecherry Maintainers <maintainers@bluecherrydvr•com>,
Laurent Pinchart <laurent.pinchart@ideasonboard•com>,
Sylwester Nawrocki <s.nawrocki@samsung•com>,
devel@driverdev•osuosl.org, Krzysztof Kozlowski <krzk@kernel•org>,
Michal Simek <michal.simek@xilinx•com>,
Andrey Utkin <andrey.utkin@corp•bluecherry.net>,
Jonathan Hunter <jonathanh@nvidia•com>,
Kukjin Kim <kgene@kernel•org>,
linux-arm-kernel@lists•infradead.org,
Ismael Luceno <ismael@iodev•co.uk>,
Linux Media Mailing List <linux-media@vger•kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead•org>,
linux-samsung-soc@vger•kernel.org, linux-tegra@vger•kernel.org,
Thomas Gleixner <tglx@linutronix•de>,
Anton Sviridenko <anton@corp•bluecherry.net>,
Allison Randal <allison@lohutok•net>,
Andy Walls <awalls@md•metrocast.net>,
Hyun Kwon <hyun.kwon@xilinx•com>,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
linux-renesas-soc@vger•kernel.org,
Kyungmin Park <kyungmin.park@samsung•com>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard•com>,
Sakari Ailus <sakari.ailus@linux•intel.com>,
Hans Verkuil <hverkuil-cisco@xs4all•nl>
Subject: Re: [PATCH v2 5/7] media: use the BIT() macro
Date: Fri, 23 Aug 2019 07:12:05 -0500 [thread overview]
Message-ID: <20190823121204.ze4m6m3dxevjpjp6@ti.com> (raw)
In-Reply-To: <d6c04bf604084af63fec603b4afbd72c648e0394.1566553525.git.mchehab+samsung@kernel.org>
Mauro Carvalho Chehab <mchehab+samsung@kernel•org> wrote on Fri [2019-Aug-23 06:47:30 -0300]:
> As warned by cppcheck:
>
> [drivers/media/dvb-frontends/cx24123.c:434]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
> [drivers/media/pci/bt8xx/bttv-input.c:87]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
> [drivers/media/pci/bt8xx/bttv-input.c:98]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
> ...
> [drivers/media/v4l2-core/v4l2-ioctl.c:1391]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
>
> There are lots of places where we're doing 1 << 31. That's bad,
> as, depending on the architecture, this has an undefined behavior.
>
> The BIT() macro is already prepared to handle this, so, let's
> just switch all "1 << number" macros by BIT(number) at the header files
> with has 1 << 31.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel•org>
> ---
>
> v2:
> As suggested by Laurent:
> - Don't touch multi-bit masks
> - remove explicit casts
>
For:
drivers/media/platform/am437x/am437x-vpfe_regs.h
drivers/media/platform/ti-vpe/vpe_regs.h
Reviewed-by: Benoit Parrot <bparrot@ti•com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-23 12:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4a411ba155eb062b6575aba0824123c840806c0b.1566502743.git.mchehab+samsung@kernel.org>
2019-08-22 19:39 ` [PATCH 3/7] media: aspeed-video: address a protential usage of an unit var Mauro Carvalho Chehab
2019-08-26 15:12 ` Eddie James
2019-08-22 19:39 ` [PATCH 6/7] media: don't do an unsigned int with a 31 bit shift Mauro Carvalho Chehab
2019-08-29 17:03 ` Kees Cook
[not found] ` <c98344166a27f771db7f6379378080b04c06c814.1566502743.git.mchehab+samsung@kernel.org>
2019-08-23 0:08 ` [PATCH 5/7] media: use the BIT() macro Laurent Pinchart
[not found] ` <CGME20190823094759epcas2p49a6bd2b5a8ada11cac762a67606d2b24@epcas2p4.samsung.com>
[not found] ` <d6c04bf604084af63fec603b4afbd72c648e0394.1566553525.git.mchehab+samsung@kernel.org>
2019-08-23 10:22 ` [PATCH v2 " Sylwester Nawrocki
2019-08-23 12:12 ` Benoit Parrot [this message]
2019-08-23 20:45 ` Laurent Pinchart
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=20190823121204.ze4m6m3dxevjpjp6@ti.com \
--to=bparrot@ti$(echo .)com \
--cc=allison@lohutok$(echo .)net \
--cc=andrey.utkin@corp$(echo .)bluecherry.net \
--cc=anton@corp$(echo .)bluecherry.net \
--cc=awalls@md$(echo .)metrocast.net \
--cc=devel@driverdev$(echo .)osuosl.org \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=hverkuil-cisco@xs4all$(echo .)nl \
--cc=hyun.kwon@xilinx$(echo .)com \
--cc=ismael@iodev$(echo .)co.uk \
--cc=jonathanh@nvidia$(echo .)com \
--cc=kgene@kernel$(echo .)org \
--cc=kieran.bingham+renesas@ideasonboard$(echo .)com \
--cc=krzk@kernel$(echo .)org \
--cc=kstewart@linuxfoundation$(echo .)org \
--cc=kyungmin.park@samsung$(echo .)com \
--cc=laurent.pinchart@ideasonboard$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-media@vger$(echo .)kernel.org \
--cc=linux-renesas-soc@vger$(echo .)kernel.org \
--cc=linux-samsung-soc@vger$(echo .)kernel.org \
--cc=linux-tegra@vger$(echo .)kernel.org \
--cc=maintainers@bluecherrydvr$(echo .)com \
--cc=mchehab+samsung@kernel$(echo .)org \
--cc=mchehab@infradead$(echo .)org \
--cc=michal.simek@xilinx$(echo .)com \
--cc=prabhakar.csengg@gmail$(echo .)com \
--cc=rfontana@redhat$(echo .)com \
--cc=s.nawrocki@samsung$(echo .)com \
--cc=sakari.ailus@linux$(echo .)intel.com \
--cc=tglx@linutronix$(echo .)de \
--cc=thierry.reding@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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