[PATCH] arm64: Silence sparse warnings caused by the type casting in (cmp)xchg

Will Deacon will at kernel.org
Wed Mar 4 08:59:03 PST 2026


On Fri, 27 Feb 2026 15:51:42 +0000, Catalin Marinas wrote:
> The arm64 xchg/cmpxchg() wrappers cast the arguments to (unsigned long)
> prior to invoking the static inline functions implementing the
> operation. Some restrictive type annotations (e.g. __bitwise) lead to
> sparse warnings like below:
> 
> sparse warnings: (new ones prefixed by >>)
>    fs/crypto/bio.c:67:17: sparse: sparse: cast from restricted blk_status_t
> >> fs/crypto/bio.c:67:17: sparse: sparse: cast to restricted blk_status_t
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Silence sparse warnings caused by the type casting in (cmp)xchg
      https://git.kernel.org/arm64/c/212dd8477653

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list