[openeuler:OLK-6.6 2665/2665] arch/arm64/kvm/rme.c:799:16: warning: variable 'data_flags' set but not used

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: a5185c1b0fd7a9b3ea9b6923d5bcedc7392c59b7 commit: e216f77846eeb7062baa345cea2be0978dea94cc [2665/2665] [v8-19-43]arm64: RME: Allow populating initial contents config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250812/202508120456.fFlvJz72-lkp@i...) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250812/202508120456.fFlvJz72-lkp@i...) 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/202508120456.fFlvJz72-lkp@intel.com/ All warnings (new ones prefixed by >>): arch/arm64/kvm/rme.c:742:7: error: call to undeclared function 'kvm_slot_can_be_private'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 742 | if (!kvm_slot_can_be_private(memslot)) { | ^ arch/arm64/kvm/rme.c:763:9: error: call to undeclared function '__kvm_faultin_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 763 | pfn = __kvm_faultin_pfn(memslot, gpa_to_gfn(ipa), FOLL_WRITE, | ^ arch/arm64/kvm/rme.c:771:9: error: call to undeclared function 'kvm_gmem_get_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 771 | ret = kvm_gmem_get_pfn(kvm, memslot, | ^
arch/arm64/kvm/rme.c:799:16: warning: variable 'data_flags' set but not used [-Wunused-but-set-variable] 799 | unsigned long data_flags = 0; | ^ 1 warning and 3 errors generated.
vim +/data_flags +799 arch/arm64/kvm/rme.c 794 795 static int kvm_populate_realm(struct kvm *kvm, 796 struct arm_rme_populate_realm *args) 797 { 798 phys_addr_t ipa_base, ipa_end;
799 unsigned long data_flags = 0; 800 801 if (kvm_realm_state(kvm) != REALM_STATE_NEW) 802 return -EPERM; 803 804 if (!IS_ALIGNED(args->base, PAGE_SIZE) || 805 !IS_ALIGNED(args->size, PAGE_SIZE) || 806 (args->flags & ~RMI_MEASURE_CONTENT)) 807 return -EINVAL; 808 809 ipa_base = args->base; 810 ipa_end = ipa_base + args->size; 811 812 if (ipa_end < ipa_base) 813 return -EINVAL; 814 815 if (args->flags & RMI_MEASURE_CONTENT) 816 data_flags |= RMI_MEASURE_CONTENT; 817 818 /* 819 * Perform the population in parts to ensure locks are not held for too 820 * long 821 */ 822 while (ipa_base < ipa_end) { 823 phys_addr_t end = min(ipa_end, ipa_base + SZ_2M); 824 825 int ret = populate_region(kvm, ipa_base, end, 826 args->flags); 827 828 if (ret) 829 return ret; 830 831 ipa_base = end; 832 833 cond_resched(); 834 } 835 836 return 0; 837 } 838
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot