Re: [PATCH 03/19] alpha: marvel: make use of raw_spinlock variants

From: kbuild test robot
Date: Sat Mar 11 2017 - 21:59:29 EST


Hi Julia,

[auto build test ERROR on gpio/for-next]
[also build test ERROR on v4.11-rc1 next-20170309]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Julia-Cartwright/fixup-usage-of-non-raw-spinlocks-in-irqchips/20170312-015922
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: alpha-alldefconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=alpha

All error/warnings (new ones prefixed by >>):

In file included from include/linux/mmzone.h:7:0,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from arch/alpha/include/asm/io.h:7,
from arch/alpha/kernel/core_marvel.c:8:
arch/alpha/kernel/core_marvel.c: In function 'alloc_io7':
>> arch/alpha/kernel/core_marvel.c:121:17: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
spin_lock_init(&io7->irq_lock);
^
include/linux/spinlock.h:293:17: note: in definition of macro 'spin_lock_init'
spinlock_check(_lock); \
^~~~~
include/linux/spinlock.h:286:40: note: expected 'spinlock_t * {aka struct spinlock *}' but argument is of type 'raw_spinlock_t * {aka struct raw_spinlock *}'
static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
^~~~~~~~~~~~~~
In file included from include/linux/mmzone.h:7:0,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from arch/alpha/include/asm/io.h:7,
from arch/alpha/kernel/core_marvel.c:8:
>> include/linux/spinlock.h:294:29: error: 'raw_spinlock_t {aka struct raw_spinlock}' has no member named 'rlock'; did you mean 'raw_lock'?
raw_spin_lock_init(&(_lock)->rlock); \
^
include/linux/spinlock.h:104:9: note: in definition of macro 'raw_spin_lock_init'
do { *(lock) = __RAW_SPIN_LOCK_UNLOCKED(lock); } while (0)
^~~~
>> arch/alpha/kernel/core_marvel.c:121:2: note: in expansion of macro 'spin_lock_init'
spin_lock_init(&io7->irq_lock);
^~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +294 include/linux/spinlock.h

c2f21ce2 Thomas Gleixner 2009-12-02 280 #endif
c2f21ce2 Thomas Gleixner 2009-12-02 281
c2f21ce2 Thomas Gleixner 2009-12-02 282 /*
c2f21ce2 Thomas Gleixner 2009-12-02 283 * Map the spin_lock functions to the raw variants for PREEMPT_RT=n
c2f21ce2 Thomas Gleixner 2009-12-02 284 */
c2f21ce2 Thomas Gleixner 2009-12-02 285
3490565b Denys Vlasenko 2015-07-13 @286 static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
c2f21ce2 Thomas Gleixner 2009-12-02 287 {
c2f21ce2 Thomas Gleixner 2009-12-02 288 return &lock->rlock;
c2f21ce2 Thomas Gleixner 2009-12-02 289 }
c2f21ce2 Thomas Gleixner 2009-12-02 290
c2f21ce2 Thomas Gleixner 2009-12-02 291 #define spin_lock_init(_lock) \
c2f21ce2 Thomas Gleixner 2009-12-02 292 do { \
c2f21ce2 Thomas Gleixner 2009-12-02 293 spinlock_check(_lock); \
c2f21ce2 Thomas Gleixner 2009-12-02 @294 raw_spin_lock_init(&(_lock)->rlock); \
c2f21ce2 Thomas Gleixner 2009-12-02 295 } while (0)
c2f21ce2 Thomas Gleixner 2009-12-02 296
3490565b Denys Vlasenko 2015-07-13 297 static __always_inline void spin_lock(spinlock_t *lock)

:::::: The code at line 294 was first introduced by commit
:::::: c2f21ce2e31286a0a32f8da0a7856e9ca1122ef3 locking: Implement new raw_spinlock

:::::: TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
:::::: CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip