[pinctrl:devel 32/33] drivers/pinctrl/samsung/pinctrl-s3c64xx.c:296:25: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
head:   3bbf9b89592d18c391eafd7a5e0e7429ae2dc767
commit: 1f306ecbe0f66681bd87a2bb9013630233a32f7f [32/33] pinctrl: samsung: use raw_spinlock for locking
config: c6x-randconfig-r021-20210125 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?id=1f306ecbe0f66681bd87a2bb9013630233a32f7f
        git remote add pinctrl https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
        git fetch --no-tags pinctrl devel
        git checkout 1f306ecbe0f66681bd87a2bb9013630233a32f7f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from include/linux/wait.h:9,
                    from include/linux/pid.h:6,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from drivers/pinctrl/samsung/pinctrl-s3c64xx.c:14:
   drivers/pinctrl/samsung/pinctrl-s3c64xx.c: In function 's3c64xx_irq_set_function':
>> drivers/pinctrl/samsung/pinctrl-s3c64xx.c:289:20: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
     289 |  spin_lock_irqsave(&bank->slock, flags);
         |                    ^~~~~~~~~~~~
         |                    |
         |                    raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:252:34: note: in definition of macro 'raw_spin_lock_irqsave'
     252 |   flags = _raw_spin_lock_irqsave(lock); \
         |                                  ^~~~
   drivers/pinctrl/samsung/pinctrl-s3c64xx.c:289:2: note: in expansion of macro 'spin_lock_irqsave'
     289 |  spin_lock_irqsave(&bank->slock, flags);
         |  ^~~~~~~~~~~~~~~~~
   In file included from include/linux/wait.h:9,
                    from include/linux/pid.h:6,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from drivers/pinctrl/samsung/pinctrl-s3c64xx.c:14:
   include/linux/spinlock.h:327:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     327 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
         |                                                       ~~~~~~~~~~~~^~~~
>> drivers/pinctrl/samsung/pinctrl-s3c64xx.c:296:25: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
     296 |  spin_unlock_irqrestore(&bank->slock, flags);
         |                         ^~~~~~~~~~~~
         |                         |
         |                         raw_spinlock_t * {aka struct raw_spinlock *}
   In file included from include/linux/wait.h:9,
                    from include/linux/pid.h:6,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from drivers/pinctrl/samsung/pinctrl-s3c64xx.c:14:
   include/linux/spinlock.h:407:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     407 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
         |                                                    ~~~~~~~~~~~~^~~~
   cc1: some warnings being treated as errors


vim +/spin_unlock_irqrestore +296 drivers/pinctrl/samsung/pinctrl-s3c64xx.c

61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  266  
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  267  static void s3c64xx_irq_set_function(struct samsung_pinctrl_drv_data *d,
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  268  					struct samsung_pin_bank *bank, int pin)
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  269  {
94ce944bed8a84 drivers/pinctrl/samsung/pinctrl-s3c64xx.c Tomasz Figa         2014-09-23  270  	const struct samsung_pin_bank_type *bank_type = bank->type;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  271  	unsigned long flags;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  272  	void __iomem *reg;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  273  	u8 shift;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  274  	u32 mask;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  275  	u32 val;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  276  
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  277  	/* Make sure that pin is configured as interrupt */
cee7413d84044a drivers/pinctrl/samsung/pinctrl-s3c64xx.c Krzysztof Kozlowski 2017-06-15  278  	reg = d->virt_base + bank->pctl_offset;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  279  	shift = pin;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  280  	if (bank_type->fld_width[PINCFG_TYPE_FUNC] * shift >= 32) {
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  281  		/* 4-bit bank type with 2 con regs */
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  282  		reg += 4;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  283  		shift -= 8;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  284  	}
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  285  
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  286  	shift = shift * bank_type->fld_width[PINCFG_TYPE_FUNC];
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  287  	mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  288  
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18 @289  	spin_lock_irqsave(&bank->slock, flags);
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  290  
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  291  	val = readl(reg);
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  292  	val &= ~(mask << shift);
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  293  	val |= bank->eint_func << shift;
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  294  	writel(val, reg);
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  295  
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18 @296  	spin_unlock_irqrestore(&bank->slock, flags);
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  297  }
61dd7261317770 drivers/pinctrl/pinctrl-s3c64xx.c         Tomasz Figa         2013-03-18  298  

:::::: The code at line 296 was first introduced by commit
:::::: 61dd726131777017348b70bd8576b42994a8ffa2 pinctrl: Add pinctrl-s3c64xx driver

:::::: TO: Tomasz Figa <tomasz.figa@xxxxxxxxx>
:::::: CC: Linus Walleij <linus.walleij@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux