]> git.baikalelectronics.ru Git - kernel.git/commit
media: media.h: Fix shifting signed 32-bit value by 31 bits problem
authorShuah Khan <skhan@linuxfoundation.org>
Thu, 13 Jun 2019 00:56:20 +0000 (20:56 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 21 Jun 2019 20:45:38 +0000 (16:45 -0400)
commitb18d6817855c0e8d903ae37a6376e8e2d2a19600
treead60063b22197e7d3c21c584ac513b5d06c8f602
parent70a6999e16f7fdf34f7dc67bd0488ab5da26147e
media: media.h: Fix shifting signed 32-bit value by 31 bits problem

Fix MEDIA_ENT_ID_FLAG_NEXT to use "U" cast to avoid shifting signed
32-bit value by 31 bits problem. This isn't a problem for kernel builds
with gcc.

This could be problem since this header is part of public API which
could be included for builds using compilers that don't handle this
condition safely resulting in undefined behavior.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
include/uapi/linux/media.h