arm64: cputype: Avoid overflow using MIDR_IMPLEMENTOR_MASK
authorMichal Orzel <michal.orzel@arm.com>
Tue, 26 Apr 2022 07:06:03 +0000 (09:06 +0200)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 4 May 2022 10:52:15 +0000 (11:52 +0100)
commit48e6f22e25a44e43952db5fbb767dea0c9319cb2
tree1d45f3e2135bb1574c338925e31ee0382e469a92
parentb6ba1a89f73f11000f6b3062c4dc2503531bd3d2
arm64: cputype: Avoid overflow using MIDR_IMPLEMENTOR_MASK

Value of macro MIDR_IMPLEMENTOR_MASK exceeds the range of integer
and can lead to overflow. Currently there is no issue as it is used
in expressions implicitly casting it to u32. To avoid possible
problems, fix the macro.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Link: https://lore.kernel.org/r/20220426070603.56031-1-michal.orzel@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cputype.h