summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/media.h
diff options
context:
space:
mode:
authorShuah Khan2019-06-13 02:56:20 +0200
committerMauro Carvalho Chehab2019-06-21 22:45:38 +0200
commit5ca004d11bfa4f5705b2761b6de29f81914cf3fe (patch)
treead60063b22197e7d3c21c584ac513b5d06c8f602 /include/uapi/linux/media.h
parentmedia: rcar-vin: Merge Gen2 and Gen3 file operations (diff)
downloadkernel-qcow2-linux-5ca004d11bfa4f5705b2761b6de29f81914cf3fe.tar.gz
kernel-qcow2-linux-5ca004d11bfa4f5705b2761b6de29f81914cf3fe.tar.xz
kernel-qcow2-linux-5ca004d11bfa4f5705b2761b6de29f81914cf3fe.zip
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>
Diffstat (limited to 'include/uapi/linux/media.h')
-rw-r--r--include/uapi/linux/media.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 9aedb187bc48..383ac7b7d8f0 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -146,7 +146,7 @@ struct media_device_info {
#define MEDIA_ENT_FL_CONNECTOR (1 << 1)
/* OR with the entity id value to find the next entity */
-#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31)
+#define MEDIA_ENT_ID_FLAG_NEXT (1U << 31)
struct media_entity_desc {
__u32 id;