All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Rick Edgecombe <rick.p.edgecombe@intel.com>
Subject: [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 &
Date: Sun, 26 Oct 2025 19:47:43 +0800	[thread overview]
Message-ID: <202510261903.dDW3ZMtf-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-10-26 11:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202510261903.dDW3ZMtf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rick.p.edgecombe@intel.com \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.