Skip to contentSkip to conversation

arch/arm64/kvm/at.c:389:21: sparse: sparse: incorrect type in assignment (different base types)

PATCH kernel test robot 1 participant 1 message Nov 25, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   92fd6e84175befa1775e5c0ab682938eca27c0b2
commit: c59ca4b5b0c3fc8386665228b0cfee56323bfeb5 [11303/11746] KVM: arm64: Implement HW access flag management in stage-1 SW PTW
config: arm64-randconfig-r133-20251125 (https://download.01.org/0day-ci/archive/20251126/[email protected]/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9e9fe08b16ea2c4d9867fb4974edf2a3776d6ece)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251126/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)

>> arch/arm64/kvm/at.c:389:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] old @@     got restricted __be64 [usertype] @@
   arch/arm64/kvm/at.c:389:21: sparse:     expected unsigned long long [usertype] old
   arch/arm64/kvm/at.c:389:21: sparse:     got restricted __be64 [usertype]
>> arch/arm64/kvm/at.c:390:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] new @@     got restricted __be64 [usertype] @@
   arch/arm64/kvm/at.c:390:21: sparse:     expected unsigned long long [usertype] new
   arch/arm64/kvm/at.c:390:21: sparse:     got restricted __be64 [usertype]
>> arch/arm64/kvm/at.c:392:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] old @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/at.c:392:21: sparse:     expected unsigned long long [usertype] old
   arch/arm64/kvm/at.c:392:21: sparse:     got restricted __le64 [usertype]
>> arch/arm64/kvm/at.c:393:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] new @@     got restricted __le64 [usertype] @@

arch/arm64/kvm/at.c:393:21: sparse: expected unsigned long long [usertype] new
arch/arm64/kvm/at.c:393:21: sparse: got restricted __le64 [usertype]
arch/arm64/kvm/at.c:1434:9: sparse: sparse: context imbalance in '__kvm_at_s1e01_fast' - wrong count at exit

vim +389 arch/arm64/kvm/at.c

384
385 static int kvm_swap_s1_desc(struct kvm_vcpu *vcpu, u64 pa, u64 old, u64 new,
386 struct s1_walk_info *wi)
387 {
388 if (wi->be) {

 > 389			old = cpu_to_be64(old);
 > 390			new = cpu_to_be64(new);
   391		} else {
 > 392			old = cpu_to_le64(old);
 > 393			new = cpu_to_le64(new);

394 }
395
396 return __kvm_at_swap_desc(vcpu->kvm, pa, old, new);
397 }
398

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki