lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210310640.gyvAPUtE-lkp@intel.com>
Date:   Mon, 31 Oct 2022 06:45:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Asmaa Mnebhi <asmaa@...dia.com>, linus.walleij@...aro.org,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        andy.shevchenko@...il.com, bgolaszewski@...libre.com,
        linux-acpi@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, Asmaa Mnebhi <asmaa@...dia.com>
Subject: Re: [PATCH v1 1/2] Support NVIDIA BlueField-3 GPIO controller

Hi Asmaa,

I love your patch! Yet something to improve:

[auto build test ERROR on brgl/gpio/for-next]
[also build test ERROR on linusw-pinctrl/devel linus/master v6.1-rc2 next-20221028]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Asmaa-Mnebhi/Add-NVIDIA-BlueField-3-GPIO-driver-and-pin-controller/20221027-013103
base:   https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link:    https://lore.kernel.org/r/20221026172843.27236-2-asmaa%40nvidia.com
patch subject: [PATCH v1 1/2] Support NVIDIA BlueField-3 GPIO controller
config: loongarch-allmodconfig
compiler: loongarch64-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/22b354edbec53a2bb9b8f1892621349f4ee2c164
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Asmaa-Mnebhi/Add-NVIDIA-BlueField-3-GPIO-driver-and-pin-controller/20221027-013103
        git checkout 22b354edbec53a2bb9b8f1892621349f4ee2c164
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/gpio/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/radix-tree.h:19,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:12,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:17,
                    from include/linux/irqdomain.h:35,
                    from include/linux/acpi.h:13,
                    from drivers/gpio/gpio-mlxbf3.c:7:
   drivers/gpio/gpio-mlxbf3.c: In function 'mlxbf3_gpio_direction_input':
>> drivers/gpio/gpio-mlxbf3.c:66:27: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
      66 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |                           ^~~~~~~~~~~~~~~~~~
         |                           |
         |                           raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:243:48: note: in definition of macro 'raw_spin_lock_irqsave'
     243 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpio/gpio-mlxbf3.c:66:9: note: in expansion of macro 'spin_lock_irqsave'
      66 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |         ^~~~~~~~~~~~~~~~~
   include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
         |                                                       ~~~~~~~~~~~~^~~~
>> drivers/gpio/gpio-mlxbf3.c:71:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
      71 |         spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
         |                                ^~~~~~~~~~~~~~~~~~
         |                                |
         |                                raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
         |                                                    ~~~~~~~~~~~~^~~~
   drivers/gpio/gpio-mlxbf3.c: In function 'mlxbf3_gpio_direction_output':
   drivers/gpio/gpio-mlxbf3.c:83:27: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
      83 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |                           ^~~~~~~~~~~~~~~~~~
         |                           |
         |                           raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:243:48: note: in definition of macro 'raw_spin_lock_irqsave'
     243 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpio/gpio-mlxbf3.c:83:9: note: in expansion of macro 'spin_lock_irqsave'
      83 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |         ^~~~~~~~~~~~~~~~~
   include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
         |                                                       ~~~~~~~~~~~~^~~~
   drivers/gpio/gpio-mlxbf3.c:92:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
      92 |         spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
         |                                ^~~~~~~~~~~~~~~~~~
         |                                |
         |                                raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
         |                                                    ~~~~~~~~~~~~^~~~
   drivers/gpio/gpio-mlxbf3.c: In function 'mlxbf3_gpio_irq_enable':
   drivers/gpio/gpio-mlxbf3.c:105:27: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
     105 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |                           ^~~~~~~~~~~~~~~~~~
         |                           |
         |                           raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:243:48: note: in definition of macro 'raw_spin_lock_irqsave'
     243 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpio/gpio-mlxbf3.c:105:9: note: in expansion of macro 'spin_lock_irqsave'
     105 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |         ^~~~~~~~~~~~~~~~~
   include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
         |                                                       ~~~~~~~~~~~~^~~~
   drivers/gpio/gpio-mlxbf3.c:111:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
     111 |         spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
         |                                ^~~~~~~~~~~~~~~~~~
         |                                |
         |                                raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
         |                                                    ~~~~~~~~~~~~^~~~
   drivers/gpio/gpio-mlxbf3.c: In function 'mlxbf3_gpio_irq_disable':
   drivers/gpio/gpio-mlxbf3.c:122:27: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
     122 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |                           ^~~~~~~~~~~~~~~~~~
         |                           |
         |                           raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:243:48: note: in definition of macro 'raw_spin_lock_irqsave'
     243 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpio/gpio-mlxbf3.c:122:9: note: in expansion of macro 'spin_lock_irqsave'
     122 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |         ^~~~~~~~~~~~~~~~~
   include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
         |                                                       ~~~~~~~~~~~~^~~~
   drivers/gpio/gpio-mlxbf3.c:126:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
     126 |         spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
         |                                ^~~~~~~~~~~~~~~~~~
         |                                |
         |                                raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
         |                                                    ~~~~~~~~~~~~^~~~
   drivers/gpio/gpio-mlxbf3.c: In function 'mlxbf3_gpio_irq_set_type':
   drivers/gpio/gpio-mlxbf3.c:171:27: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
     171 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |                           ^~~~~~~~~~~~~~~~~~
         |                           |
         |                           raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:243:48: note: in definition of macro 'raw_spin_lock_irqsave'
     243 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpio/gpio-mlxbf3.c:171:9: note: in expansion of macro 'spin_lock_irqsave'
     171 |         spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
         |         ^~~~~~~~~~~~~~~~~
   include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
         |                                                       ~~~~~~~~~~~~^~~~
   drivers/gpio/gpio-mlxbf3.c:183:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
     183 |         spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
         |                                ^~~~~~~~~~~~~~~~~~
         |                                |
         |                                raw_spinlock_t * {aka struct raw_spinlock *}
   include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
     403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
         |                                                    ~~~~~~~~~~~~^~~~
   cc1: some warnings being treated as errors


vim +/spinlock_check +66 drivers/gpio/gpio-mlxbf3.c

    59	
    60	static int mlxbf3_gpio_direction_input(struct gpio_chip *chip,
    61					       unsigned int offset)
    62	{
    63		struct mlxbf3_gpio_context *gs = gpiochip_get_data(chip);
    64		unsigned long flags;
    65	
  > 66		spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
    67	
    68		/* Write-only register */
    69		writel(BIT(offset), gs->gpio_io + YU_GPIO_FW_OUTPUT_ENABLE_CLEAR);
    70	
  > 71		spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
    72	
    73		return 0;
    74	}
    75	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (321395 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ