]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit376e6d11e978b7cc2f444031435ab1ecc956c7f1
tree1d45f3e2135bb1574c338925e31ee0382e469a92
parent6b85c25070219f04b9114757a01591df6fc1305f
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