mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/riscv/kvm/nacl.c:28:21: sparse: sparse: cast to restricted __le32
@ 2024-12-19 11:04 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-19 11:04 UTC (permalink / raw)
  To: Anup Patel; +Cc: oe-kbuild-all, linux-kernel, Atish Patra

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   eabcdba3ad4098460a376538df2ae36500223c1e
commit: d466c19cead5904d4d5d92adb2b213b411d3b849 RISC-V: KVM: Add common nested acceleration support
date:   7 weeks ago
config: riscv-randconfig-r113-20241219 (https://download.01.org/0day-ci/archive/20241219/202412191824.oRnRcOY5-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241219/202412191824.oRnRcOY5-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412191824.oRnRcOY5-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> arch/riscv/kvm/nacl.c:28:21: sparse: sparse: cast to restricted __le32
>> arch/riscv/kvm/nacl.c:46:15: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long @@     got restricted __le32 [usertype] @@
   arch/riscv/kvm/nacl.c:46:15: sparse:     expected unsigned long
   arch/riscv/kvm/nacl.c:46:15: sparse:     got restricted __le32 [usertype]
   arch/riscv/kvm/nacl.c:48:15: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long @@     got restricted __le32 [usertype] @@
   arch/riscv/kvm/nacl.c:48:15: sparse:     expected unsigned long
   arch/riscv/kvm/nacl.c:48:15: sparse:     got restricted __le32 [usertype]
   arch/riscv/kvm/nacl.c:50:15: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long @@     got restricted __le32 [usertype] @@
   arch/riscv/kvm/nacl.c:50:15: sparse:     expected unsigned long
   arch/riscv/kvm/nacl.c:50:15: sparse:     got restricted __le32 [usertype]

vim +28 arch/riscv/kvm/nacl.c

    16	
    17	void __kvm_riscv_nacl_hfence(void *shmem,
    18				     unsigned long control,
    19				     unsigned long page_num,
    20				     unsigned long page_count)
    21	{
    22		int i, ent = -1, try_count = 5;
    23		unsigned long *entp;
    24	
    25	again:
    26		for (i = 0; i < SBI_NACL_SHMEM_HFENCE_ENTRY_MAX; i++) {
    27			entp = shmem + SBI_NACL_SHMEM_HFENCE_ENTRY_CONFIG(i);
  > 28			if (lelong_to_cpu(*entp) & SBI_NACL_SHMEM_HFENCE_CONFIG_PEND)
    29				continue;
    30	
    31			ent = i;
    32			break;
    33		}
    34	
    35		if (ent < 0) {
    36			if (try_count) {
    37				nacl_sync_hfence(-1UL);
    38				goto again;
    39			} else {
    40				pr_warn("KVM: No free entry in NACL shared memory\n");
    41				return;
    42			}
    43		}
    44	
    45		entp = shmem + SBI_NACL_SHMEM_HFENCE_ENTRY_CONFIG(i);
  > 46		*entp = cpu_to_lelong(control);
    47		entp = shmem + SBI_NACL_SHMEM_HFENCE_ENTRY_PNUM(i);
    48		*entp = cpu_to_lelong(page_num);
    49		entp = shmem + SBI_NACL_SHMEM_HFENCE_ENTRY_PCOUNT(i);
    50		*entp = cpu_to_lelong(page_count);
    51	}
    52	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-19 11:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-19 11:04 arch/riscv/kvm/nacl.c:28:21: sparse: sparse: cast to restricted __le32 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®