media: don't do a 31 bit shift on a signed int
On 32-bits archs, a signed integer has 31 bits plus on extra bit for signal. Due to that, touching the 32th bit with something like: int bar = 1 << 31; has an undefined behavior in C on 32 bit architectures, as it touches the signal bit. This is warned by cppcheck. Instead, force the numbers to be unsigned, in order to solve this issue. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Цей коміт міститься в:
@@ -120,7 +120,7 @@ module_param(debug, bool, 0644);
|
||||
#define PRP_CNTL_RZ_FIFO_LEVEL(x) ((x) << 27)
|
||||
#define PRP_CNTL_CH2B1EN (1 << 29)
|
||||
#define PRP_CNTL_CH2B2EN (1 << 30)
|
||||
#define PRP_CNTL_CH2FEN (1 << 31)
|
||||
#define PRP_CNTL_CH2FEN (1UL << 31)
|
||||
|
||||
#define PRP_SIZE_HEIGHT(x) (x)
|
||||
#define PRP_SIZE_WIDTH(x) ((x) << 16)
|
||||
|
Посилання в новій задачі
Заблокувати користувача