* [weiny2:ackerley-1g-master 27/75] arch/x86/kvm/../../../virt/kvm/guest_memfd.c:805:15: warning: variable 'argp' set but not used
@ 2025-05-19 13:30 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-19 13:30 UTC (permalink / raw)
To: Ackerley Tng; +Cc: llvm, oe-kbuild-all, Ira Weiny
tree: https://github.com/weiny2/linux-kernel.git ackerley-1g-master
head: 773f26b5bef6e4d3094a33605165a5c6ab9aa0f0
commit: 02bb15aeea3c78413143e7b2944e2b801c7024e7 [27/75] KVM: guest_memfd: Introduce KVM_GMEM_CONVERT_SHARED/PRIVATE ioctls
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250519/202505192134.fNISBqMT-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250519/202505192134.fNISBqMT-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/202505192134.fNISBqMT-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:401:2: error: too few arguments to function call, at least argument 'fmt' must be specified
401 | WARN_ONCE("Unexpected call to get shared folio.")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:152:29: note: expanded from macro 'WARN_ONCE'
152 | DO_ONCE_LITE_IF(condition, WARN, 1, format)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
include/linux/once_lite.h:31:4: note: expanded from macro 'DO_ONCE_LITE_IF'
31 | func(__VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:134:3: note: expanded from macro 'WARN'
134 | __WARN_printf(TAINT_WARN, format); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:106:20: note: expanded from macro '__WARN_printf'
106 | __warn_printk(arg); \
| ~~~~~~~~~~~~~ ^
include/asm-generic/bug.h:93:28: note: '__warn_printk' declared here
93 | extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
| ^
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:401:51: error: expected ';' after expression
401 | WARN_ONCE("Unexpected call to get shared folio.")
| ^
| ;
>> arch/x86/kvm/../../../virt/kvm/guest_memfd.c:805:15: warning: variable 'argp' set but not used [-Wunused-but-set-variable]
805 | void __user *argp;
| ^
>> arch/x86/kvm/../../../virt/kvm/guest_memfd.c:835:1: warning: unused label 'out' [-Wunused-label]
835 | out:
| ^~~~
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:858:33: warning: unused variable 'private' [-Wunused-variable]
858 | struct kvm_gmem_inode_private *private = kvm_gmem_private(inode);
| ^~~~~~~
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1014:20: error: no member named 'shareability' in 'struct kvm_gmem_inode_private'
1014 | mt_init(&private->shareability);
| ~~~~~~~ ^
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1017:36: error: incompatible pointer types passing 'struct kvm_gmem_inode_private *' to parameter of type 'struct maple_tree *' [-Werror,-Wincompatible-pointer-types]
1017 | err = kvm_gmem_shareability_setup(private, size, flags);
| ^~~~~~~
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:394:59: note: passing argument to parameter 'mt' here
394 | static int kvm_gmem_shareability_setup(struct maple_tree *mt, loff_t size, u64 flags)
| ^
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1192:6: error: call to undeclared function 'kvm_gmem_supports_shared'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1192 | if (kvm_gmem_supports_shared(inode)) {
| ^
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1192:6: note: did you mean 'kvm_gmem_memslot_supports_shared'?
include/linux/kvm_host.h:2513:20: note: 'kvm_gmem_memslot_supports_shared' declared here
2513 | static inline bool kvm_gmem_memslot_supports_shared(const struct kvm_memory_slot *slot)
| ^
3 warnings and 5 errors generated.
vim +/argp +805 arch/x86/kvm/../../../virt/kvm/guest_memfd.c
801
802 static long kvm_gmem_ioctl(struct file *file, unsigned int ioctl,
803 unsigned long arg)
804 {
> 805 void __user *argp;
806 int r;
807
808 argp = (void __user *)arg;
809
810 switch (ioctl) {
811 #ifdef CONFIG_KVM_GMEM_SHARED_MEM
812 case KVM_GMEM_CONVERT_SHARED:
813 case KVM_GMEM_CONVERT_PRIVATE: {
814 struct kvm_gmem_convert param;
815 bool to_shared;
816
817 r = -EFAULT;
818 if (copy_from_user(¶m, argp, sizeof(param)))
819 goto out;
820
821 to_shared = ioctl == KVM_GMEM_CONVERT_SHARED;
822 r = kvm_gmem_ioctl_convert_range(file, ¶m, to_shared);
823 if (r) {
824 if (copy_to_user(argp, ¶m, sizeof(param))) {
825 r = -EFAULT;
826 goto out;
827 }
828 }
829 break;
830 }
831 #endif
832 default:
833 r = -ENOTTY;
834 }
> 835 out:
836 return r;
837 }
838
--
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:[~2025-05-19 13:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-19 13:30 [weiny2:ackerley-1g-master 27/75] arch/x86/kvm/../../../virt/kvm/guest_memfd.c:805:15: warning: variable 'argp' set but not used 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