[kvm:queue 2/3] arch/riscv/kvm/mmu.c:355:75: error: expected '}' before ';' token

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
head:   93472b79715378a2386598d6632c654a2223267b
commit: 24688433d2ef9b65af51aa065f649b5f891f6961 [2/3] Merge remote-tracking branch 'kvm/next' into kvm-next-5.20
config: riscv-rv32_defconfig (https://download.01.org/0day-ci/archive/20220802/202208021421.qOE4UXM6-lkp@xxxxxxxxx/config)
compiler: riscv32-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?id=24688433d2ef9b65af51aa065f649b5f891f6961
        git remote add kvm https://git.kernel.org/pub/scm/virt/kvm/kvm.git
        git fetch --no-tags kvm queue
        git checkout 24688433d2ef9b65af51aa065f649b5f891f6961
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kvm/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   arch/riscv/kvm/mmu.c: In function 'kvm_riscv_gstage_ioremap':
>> arch/riscv/kvm/mmu.c:355:75: error: expected '}' before ';' token
     355 |                 .gfp_custom = (in_atomic) ? GFP_ATOMIC | __GFP_ACCOUNT : 0;
         |                                                                           ^
   arch/riscv/kvm/mmu.c:354:46: note: to match this '{'
     354 |         struct kvm_mmu_memory_cache pcache = {
         |                                              ^


vim +355 arch/riscv/kvm/mmu.c

   345	
   346	int kvm_riscv_gstage_ioremap(struct kvm *kvm, gpa_t gpa,
   347				     phys_addr_t hpa, unsigned long size,
   348				     bool writable, bool in_atomic)
   349	{
   350		pte_t pte;
   351		int ret = 0;
   352		unsigned long pfn;
   353		phys_addr_t addr, end;
   354		struct kvm_mmu_memory_cache pcache = {
 > 355			.gfp_custom = (in_atomic) ? GFP_ATOMIC | __GFP_ACCOUNT : 0;
   356			.gfp_zero = __GFP_ZERO;
   357		};
   358	
   359		end = (gpa + size + PAGE_SIZE - 1) & PAGE_MASK;
   360		pfn = __phys_to_pfn(hpa);
   361	
   362		for (addr = gpa; addr < end; addr += PAGE_SIZE) {
   363			pte = pfn_pte(pfn, PAGE_KERNEL_IO);
   364	
   365			if (!writable)
   366				pte = pte_wrprotect(pte);
   367	
   368			ret = kvm_mmu_topup_memory_cache(&pcache, gstage_pgd_levels);
   369			if (ret)
   370				goto out;
   371	
   372			spin_lock(&kvm->mmu_lock);
   373			ret = gstage_set_pte(kvm, 0, &pcache, addr, &pte);
   374			spin_unlock(&kvm->mmu_lock);
   375			if (ret)
   376				goto out;
   377	
   378			pfn++;
   379		}
   380	
   381	out:
   382		kvm_mmu_free_memory_cache(&pcache);
   383		return ret;
   384	}
   385	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux