]> 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)
commit787e72764d4f86ab1a378d8d5ce264c9686914a2
tree1d45f3e2135bb1574c338925e31ee0382e469a92
parent190b93183f0b4f2bcb6da24381554f6ddb4b433f
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