]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: remove an impossible condition
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 11 Apr 2018 12:27:59 +0000 (08:27 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 17 Apr 2018 09:49:59 +0000 (05:49 -0400)
commit242d0e43b4a4c0d579f67dea2228260c6f1455b4
tree5f5607a0d9bf8aa8538aaf0f7a52f6c66877223c
parent8856d795fdca528c54566eafc0f5320482dabcd1
media: atomisp: remove an impossible condition

Changeset 2d9decd49b30 ("media: staging: atomisp: avoid a warning if 32
bits build") was meant to solve an impossible condition when building
with 32 bits. It turns that this impossible condition also happens wit
64 bits:
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:698 gmin_get_config_var() warn: impossible condition '(*out_len > (~0)) => (0-u64max > u64max)'

After a further analysis, this condition will always be false as, on
all architectures, size_t doesn't have more bits than unsigned long.

Also, the only two archs that really matter are x86 and x86_64, as this
driver doesn't build on other archs (as it depends on X86-specific UEFI
support).

So, just drop the useless code.

Fixes: 2d9decd49b30 ("media: staging: atomisp: avoid a warning if 32 bits build")
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c