[PATCH] iommu/arm-smmu-v3: Fix endianness annotations

Will Deacon will at kernel.org
Mon Sep 21 14:17:38 EDT 2020


On Fri, 18 Sep 2020 16:18:57 +0200, Jean-Philippe Brucker wrote:
> When building with C=1, sparse reports some issues regarding endianness
> annotations:
> 
> arm-smmu-v3.c:221:26: warning: cast to restricted __le64
> arm-smmu-v3.c:221:24: warning: incorrect type in assignment (different base types)
> arm-smmu-v3.c:221:24:    expected restricted __le64 [usertype]
> arm-smmu-v3.c:221:24:    got unsigned long long [usertype]
> arm-smmu-v3.c:229:20: warning: incorrect type in argument 1 (different base types)
> arm-smmu-v3.c:229:20:    expected restricted __le64 [usertype] *[assigned] dst
> arm-smmu-v3.c:229:20:    got unsigned long long [usertype] *ent
> arm-smmu-v3.c:229:25: warning: incorrect type in argument 2 (different base types)
> arm-smmu-v3.c:229:25:    expected unsigned long long [usertype] *[assigned] src
> arm-smmu-v3.c:229:25:    got restricted __le64 [usertype] *
> arm-smmu-v3.c:396:20: warning: incorrect type in argument 1 (different base types)
> arm-smmu-v3.c:396:20:    expected restricted __le64 [usertype] *[assigned] dst
> arm-smmu-v3.c:396:20:    got unsigned long long *
> arm-smmu-v3.c:396:25: warning: incorrect type in argument 2 (different base types)
> arm-smmu-v3.c:396:25:    expected unsigned long long [usertype] *[assigned] src
> arm-smmu-v3.c:396:25:    got restricted __le64 [usertype] *
> arm-smmu-v3.c:1349:32: warning: invalid assignment: |=
> arm-smmu-v3.c:1349:32:    left side has type restricted __le64
> arm-smmu-v3.c:1349:32:    right side has type unsigned long
> arm-smmu-v3.c:1396:53: warning: incorrect type in argument 3 (different base types)
> arm-smmu-v3.c:1396:53:    expected restricted __le64 [usertype] *dst
> arm-smmu-v3.c:1396:53:    got unsigned long long [usertype] *strtab
> arm-smmu-v3.c:1424:39: warning: incorrect type in argument 1 (different base types)
> arm-smmu-v3.c:1424:39:    expected unsigned long long [usertype] *[assigned] strtab
> arm-smmu-v3.c:1424:39:    got restricted __le64 [usertype] *l2ptr
> 
> [...]

Applied to will (for-joerg/arm-smmu/updates), thanks!

[1/1] iommu/arm-smmu-v3: Fix endianness annotations
      https://git.kernel.org/will/c/376cdf66f624

Cheers,
-- 
Will

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



More information about the linux-arm-kernel mailing list