All of lore.kernel.org
 help / color / mirror / Atom feed
* [sean-jc:vmx/tdx_populate_cleanups 5/28] arch/x86/kvm/mmu/mmu.c:5026:33: error: incompatible pointer types passing 'struct file **' to parameter of type 'const struct file *'; remove &
@ 2025-10-26 11:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-10-26 11:47 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: llvm, oe-kbuild-all, Rick Edgecombe

tree:   https://github.com/sean-jc/linux vmx/tdx_populate_cleanups
head:   3953e46cd4d0caddb7962096b0c1b55da11dee41
commit: 0af292fb1de0ccf09271d5fa752cdaf67f958055 [5/28] KVM: x86/mmu: Add dedicated API to map guest_memfd pfn into TDP MMU
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20251026/202510261903.dDW3ZMtf-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251026/202510261903.dDW3ZMtf-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/202510261903.dDW3ZMtf-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kvm/mmu/mmu.c:5026:33: error: incompatible pointer types passing 'struct file **' to parameter of type 'const struct file *'; remove & [-Werror,-Wincompatible-pointer-types]
    5026 |         lockdep_assert_held(file_inode(&slot->gmem.file)->i_mapping->invalidate_lock));
         |                                        ^~~~~~~~~~~~~~~~
   include/linux/lockdep.h:285:33: note: expanded from macro 'lockdep_assert_held'
     285 |         lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
         |                                        ^
   include/linux/lockdep.h:252:47: note: expanded from macro 'lockdep_is_held'
     252 | #define lockdep_is_held(lock)           lock_is_held(&(lock)->dep_map)
         |                                                        ^~~~
   include/linux/lockdep.h:279:32: note: expanded from macro 'lockdep_assert'
     279 |         do { WARN_ON(debug_locks && !(cond)); } while (0)
         |                                       ^~~~
   include/asm-generic/bug.h:123:25: note: expanded from macro 'WARN_ON'
     123 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   include/linux/fs.h:1302:59: note: passing argument to parameter 'f' here
    1302 | static inline struct inode *file_inode(const struct file *f)
         |                                                           ^
>> arch/x86/kvm/mmu/mmu.c:5026:2: error: member reference type 'struct rw_semaphore' is not a pointer; did you mean to use '.'?
    5026 |         lockdep_assert_held(file_inode(&slot->gmem.file)->i_mapping->invalidate_lock));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:285:17: note: expanded from macro 'lockdep_assert_held'
     285 |         lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
         |         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:252:52: note: expanded from macro 'lockdep_is_held'
     252 | #define lockdep_is_held(lock)           lock_is_held(&(lock)->dep_map)
         |                                                             ^
   include/linux/lockdep.h:279:32: note: expanded from macro 'lockdep_assert'
     279 |         do { WARN_ON(debug_locks && !(cond)); } while (0)
         |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   include/asm-generic/bug.h:123:25: note: expanded from macro 'WARN_ON'
     123 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
>> arch/x86/kvm/mmu/mmu.c:5026:2: error: cannot take the address of an rvalue of type 'struct lockdep_map'
    5026 |         lockdep_assert_held(file_inode(&slot->gmem.file)->i_mapping->invalidate_lock));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:285:17: note: expanded from macro 'lockdep_assert_held'
     285 |         lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
         |         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:252:45: note: expanded from macro 'lockdep_is_held'
     252 | #define lockdep_is_held(lock)           lock_is_held(&(lock)->dep_map)
         |                                                      ^
   include/linux/lockdep.h:279:32: note: expanded from macro 'lockdep_assert'
     279 |         do { WARN_ON(debug_locks && !(cond)); } while (0)
         |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   include/asm-generic/bug.h:123:25: note: expanded from macro 'WARN_ON'
     123 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   arch/x86/kvm/mmu/mmu.c:5026:79: error: expected ';' after do/while statement
    5026 |         lockdep_assert_held(file_inode(&slot->gmem.file)->i_mapping->invalidate_lock));
         |                                                                                      ^
         |                                                                                      ;
   4 errors generated.


vim +5026 arch/x86/kvm/mmu/mmu.c

  5016	
  5017	#ifdef CONFIG_KVM_GUEST_MEMFD
  5018	static void kvm_assert_gmem_invalidate_lock_held(struct kvm_memory_slot *slot)
  5019	{
  5020	#ifdef CONFIG_PROVE_LOCKING
  5021		if (WARN_ON_ONCE(!kvm_slot_has_gmem(slot)) ||
  5022		    WARN_ON_ONCE(!slot->gmem.file) ||
  5023		    WARN_ON_ONCE(!file_count(slot->gmem.file)))
  5024			return;
  5025	
> 5026		lockdep_assert_held(file_inode(&slot->gmem.file)->i_mapping->invalidate_lock));
  5027	#endif
  5028	}
  5029	

-- 
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-10-26 11:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-26 11:47 [sean-jc:vmx/tdx_populate_cleanups 5/28] arch/x86/kvm/mmu/mmu.c:5026:33: error: incompatible pointer types passing 'struct file **' to parameter of type 'const struct file *'; remove & kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.