public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kmo@daterainc.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Kent Overstreet <kmo@daterainc.com>
Subject: [bcachefs:header_cleanup 47/50] arch/mips/include/asm/spinlock.h:24:2: error: call to undeclared function 'mmiowb'; ISO C99 and later do not support implicit function declarations
Date: Mon, 18 Dec 2023 06:14:34 +0800	[thread overview]
Message-ID: <202312180628.rX4TbmNf-lkp@intel.com> (raw)

tree:   https://evilpiepirate.org/git/bcachefs.git header_cleanup
head:   7288b19e061b7aa3f46f685e9944af128f10ffd5
commit: 5d70b2be493cb95b706948b380d142fe9e628e59 [47/50] thread_info, uaccess.h: Move HARDENED_USERCOPY to better location
config: mips-mtx1_defconfig (https://download.01.org/0day-ci/archive/20231218/202312180628.rX4TbmNf-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231218/202312180628.rX4TbmNf-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/202312180628.rX4TbmNf-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:9:
   In file included from include/linux/uaccess.h:9:
   In file included from include/linux/sched.h:2145:
   In file included from arch/mips/include/asm/spinlock.h:14:
   include/asm-generic/qspinlock_types.h:44:3: error: typedef redefinition with different types ('struct qspinlock' vs 'struct arch_spinlock_t')
   } arch_spinlock_t;
     ^
   include/linux/spinlock_types_up.h:25:20: note: previous definition is here
   typedef struct { } arch_spinlock_t;
                      ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:9:
   In file included from include/linux/uaccess.h:9:
   In file included from include/linux/sched.h:2145:
   In file included from arch/mips/include/asm/spinlock.h:14:
   include/asm-generic/qspinlock_types.h:49:9: warning: '__ARCH_SPIN_LOCK_UNLOCKED' macro redefined [-Wmacro-redefined]
   #define __ARCH_SPIN_LOCK_UNLOCKED       { { .val = ATOMIC_INIT(0) } }
           ^
   include/linux/spinlock_types_up.h:27:9: note: previous definition is here
   #define __ARCH_SPIN_LOCK_UNLOCKED { }
           ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:9:
   In file included from include/linux/uaccess.h:9:
   In file included from include/linux/sched.h:2145:
>> arch/mips/include/asm/spinlock.h:24:2: error: call to undeclared function 'mmiowb'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           mmiowb();
           ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:9:
   In file included from include/linux/uaccess.h:9:
   In file included from include/linux/sched.h:2145:
   In file included from arch/mips/include/asm/spinlock.h:29:
   In file included from ./arch/mips/include/generated/asm/qrwlock.h:1:
   In file included from include/asm-generic/qrwlock.h:20:
   include/asm-generic/qrwlock_types.h:27:3: error: typedef redefinition with different types ('struct qrwlock' vs 'struct arch_rwlock_t')
   } arch_rwlock_t;
     ^
   include/linux/spinlock_types_up.h:33:3: note: previous definition is here
   } arch_rwlock_t;
     ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:9:
   In file included from include/linux/uaccess.h:9:
   In file included from include/linux/sched.h:2145:
   In file included from arch/mips/include/asm/spinlock.h:29:
   In file included from ./arch/mips/include/generated/asm/qrwlock.h:1:
   In file included from include/asm-generic/qrwlock.h:20:
   include/asm-generic/qrwlock_types.h:29:9: warning: '__ARCH_RW_LOCK_UNLOCKED' macro redefined [-Wmacro-redefined]
   #define __ARCH_RW_LOCK_UNLOCKED {               \
           ^
   include/linux/spinlock_types_up.h:35:9: note: previous definition is here
   #define __ARCH_RW_LOCK_UNLOCKED { }
           ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:9:
   In file included from include/linux/uaccess.h:9:
   In file included from include/linux/sched.h:2145:
   In file included from arch/mips/include/asm/spinlock.h:29:
   In file included from ./arch/mips/include/generated/asm/qrwlock.h:1:
   include/asm-generic/qrwlock.h:132:29: error: incompatible pointer types passing 'arch_spinlock_t *' to parameter of type 'struct qspinlock *' [-Werror,-Wincompatible-pointer-types]
           return arch_spin_is_locked(&lock->wait_lock);
                                      ^~~~~~~~~~~~~~~~
   include/asm-generic/qspinlock.h:143:55: note: expanded from macro 'arch_spin_is_locked'
   #define arch_spin_is_locked(l)          queued_spin_is_locked(l)
                                                                 ^
   include/asm-generic/qspinlock.h:51:68: note: passing argument to parameter 'lock' here
   static __always_inline int queued_spin_is_locked(struct qspinlock *lock)
                                                                      ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:10:
   In file included from include/linux/mm_types.h:8:
   In file included from include/linux/kref.h:16:
   In file included from include/linux/spinlock.h:97:
   include/linux/spinlock_up.h:62:9: warning: 'arch_spin_is_locked' macro redefined [-Wmacro-redefined]
   #define arch_spin_is_locked(lock)       ((void)(lock), 0)
           ^
   include/asm-generic/qspinlock.h:143:9: note: previous definition is here
   #define arch_spin_is_locked(l)          queued_spin_is_locked(l)
           ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:10:
   In file included from include/linux/mm_types.h:8:
   In file included from include/linux/kref.h:16:
   In file included from include/linux/spinlock.h:97:
   include/linux/spinlock_up.h:64:10: warning: 'arch_spin_lock' macro redefined [-Wmacro-redefined]
   # define arch_spin_lock(lock)           do { barrier(); (void)(lock); } while (0)
            ^
   include/asm-generic/qspinlock.h:146:9: note: previous definition is here
   #define arch_spin_lock(l)               queued_spin_lock(l)
           ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:10:
   In file included from include/linux/mm_types.h:8:
   In file included from include/linux/kref.h:16:
   In file included from include/linux/spinlock.h:97:
   include/linux/spinlock_up.h:65:10: warning: 'arch_spin_unlock' macro redefined [-Wmacro-redefined]
   # define arch_spin_unlock(lock) do { barrier(); (void)(lock); } while (0)
            ^
   include/asm-generic/qspinlock.h:148:9: note: previous definition is here
   #define arch_spin_unlock(l)             queued_spin_unlock(l)
           ^
   In file included from arch/mips/kernel/asm-offsets.c:12:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:10:
   In file included from include/linux/mm_types.h:8:
   In file included from include/linux/kref.h:16:
   In file included from include/linux/spinlock.h:97:
   include/linux/spinlock_up.h:66:10: warning: 'arch_spin_trylock' macro redefined [-Wmacro-redefined]
   # define arch_spin_trylock(lock)        ({ barrier(); (void)(lock); 1; })
            ^
   include/asm-generic/qspinlock.h:147:9: note: previous definition is here
   #define arch_spin_trylock(l)            queued_spin_trylock(l)


vim +/mmiowb +24 arch/mips/include/asm/spinlock.h

346e91ee090b07 Will Deacon 2019-02-22  15  
346e91ee090b07 Will Deacon 2019-02-22  16  #define	queued_spin_unlock queued_spin_unlock
346e91ee090b07 Will Deacon 2019-02-22  17  /**
346e91ee090b07 Will Deacon 2019-02-22  18   * queued_spin_unlock - release a queued spinlock
346e91ee090b07 Will Deacon 2019-02-22  19   * @lock : Pointer to queued spinlock structure
346e91ee090b07 Will Deacon 2019-02-22  20   */
346e91ee090b07 Will Deacon 2019-02-22  21  static inline void queued_spin_unlock(struct qspinlock *lock)
346e91ee090b07 Will Deacon 2019-02-22  22  {
346e91ee090b07 Will Deacon 2019-02-22  23  	/* This could be optimised with ARCH_HAS_MMIOWB */
346e91ee090b07 Will Deacon 2019-02-22 @24  	mmiowb();
346e91ee090b07 Will Deacon 2019-02-22  25  	smp_store_release(&lock->locked, 0);
346e91ee090b07 Will Deacon 2019-02-22  26  }
346e91ee090b07 Will Deacon 2019-02-22  27  

:::::: The code at line 24 was first introduced by commit
:::::: 346e91ee090b07da8d15e36bc3169ddea6968713 mips/mmiowb: Add unconditional mmiowb() to arch_spin_unlock()

:::::: TO: Will Deacon <will.deacon@arm.com>
:::::: CC: Will Deacon <will.deacon@arm.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-12-17 22:15 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=202312180628.rX4TbmNf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kmo@daterainc.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox