[linusw-pinctrl:ib-nomadik-gpio 27/27] include/linux/property.h:39:9: error: initialization of 'struct device_node *' from incompatible pointer type 'struct fwnode_handle *'

[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 ib-nomadik-gpio
head:   528904342169c582c128c4f83fbc4a7c9611fb0a
commit: 528904342169c582c128c4f83fbc4a7c9611fb0a [27/27] gpio: nomadik: Finish conversion to use firmware node APIs
config: arm-randconfig-003-20240302 (https://download.01.org/0day-ci/archive/20240302/202403022253.zPyD6rUu-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240302/202403022253.zPyD6rUu-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403022253.zPyD6rUu-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from include/linux/of.h:19,
                    from include/linux/irqdomain.h:36,
                    from include/linux/gpio/driver.h:9,
                    from drivers/pinctrl/nomadik/pinctrl-nomadik.c:18:
   drivers/pinctrl/nomadik/pinctrl-nomadik.c: In function 'nmk_pinctrl_probe':
>> include/linux/property.h:39:9: error: initialization of 'struct device_node *' from incompatible pointer type 'struct fwnode_handle *' [-Werror=incompatible-pointer-types]
      39 |         _Generic((dev),                                                 \
         |         ^~~~~~~~
   drivers/pinctrl/nomadik/pinctrl-nomadik.c:1193:38: note: in expansion of macro 'dev_fwnode'
    1193 |         struct device_node *fwnode = dev_fwnode(&pdev->dev);
         |                                      ^~~~~~~~~~
>> drivers/pinctrl/nomadik/pinctrl-nomadik.c:1222:53: error: passing argument 1 of 'fwnode_find_reference' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1222 |                 gpio_fwnode = fwnode_find_reference(fwnode, "nomadik-gpio-chips", i);
         |                                                     ^~~~~~
         |                                                     |
         |                                                     struct device_node *
   include/linux/property.h:144:73: note: expected 'const struct fwnode_handle *' but argument is of type 'struct device_node *'
     144 | struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode,
         |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   drivers/pinctrl/nomadik/pinctrl-nomadik.c:1236:45: error: passing argument 1 of 'fwnode_find_reference' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1236 |         prcm_fwnode = fwnode_find_reference(fwnode, "prcm", 0);
         |                                             ^~~~~~
         |                                             |
         |                                             struct device_node *
   include/linux/property.h:144:73: note: expected 'const struct fwnode_handle *' but argument is of type 'struct device_node *'
     144 | struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode,
         |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
>> drivers/pinctrl/nomadik/pinctrl-nomadik.c:1236:21: error: assignment to 'struct device_node *' from incompatible pointer type 'struct fwnode_handle *' [-Werror=incompatible-pointer-types]
    1236 |         prcm_fwnode = fwnode_find_reference(fwnode, "prcm", 0);
         |                     ^
>> drivers/pinctrl/nomadik/pinctrl-nomadik.c:1238:48: error: passing argument 1 of 'fwnode_iomap' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1238 |                 npct->prcm_base = fwnode_iomap(prcm_fwnode, 0);
         |                                                ^~~~~~~~~~~
         |                                                |
         |                                                struct device_node *
   include/linux/property.h:452:50: note: expected 'struct fwnode_handle *' but argument is of type 'struct device_node *'
     452 | void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index);
         |                            ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
>> drivers/pinctrl/nomadik/pinctrl-nomadik.c:1239:35: error: passing argument 1 of 'fwnode_handle_put' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1239 |                 fwnode_handle_put(prcm_fwnode);
         |                                   ^~~~~~~~~~~
         |                                   |
         |                                   struct device_node *
   include/linux/property.h:190:46: note: expected 'struct fwnode_handle *' but argument is of type 'struct device_node *'
     190 | void fwnode_handle_put(struct fwnode_handle *fwnode);
         |                        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   cc1: some warnings being treated as errors


vim +39 include/linux/property.h

1b9863c6aa56d9 Suthikulpanit, Suravee 2015-10-28  35  
b295d484b97081 Andy Shevchenko        2022-10-04  36  const struct fwnode_handle *__dev_fwnode_const(const struct device *dev);
b295d484b97081 Andy Shevchenko        2022-10-04  37  struct fwnode_handle *__dev_fwnode(struct device *dev);
b295d484b97081 Andy Shevchenko        2022-10-04  38  #define dev_fwnode(dev)							\
b295d484b97081 Andy Shevchenko        2022-10-04 @39  	_Generic((dev),							\
b295d484b97081 Andy Shevchenko        2022-10-04  40  		 const struct device *: __dev_fwnode_const,	\
b295d484b97081 Andy Shevchenko        2022-10-04  41  		 struct device *: __dev_fwnode)(dev)
e44bb0cbdc8868 Sakari Ailus           2017-03-28  42  

:::::: The code at line 39 was first introduced by commit
:::::: b295d484b97081feba72b071ffcb72fb4638ccfd device property: Allow const parameter to dev_fwnode()

:::::: TO: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

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




[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