[linusw-pinctrl:ib-nomadik-gpio 27/27] drivers/pinctrl/nomadik/pinctrl-nomadik.c:1193:22: error: incompatible pointer types initializing 'struct device_node *' with an expression of 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-defconfig (https://download.01.org/0day-ci/archive/20240303/202403030335.VHvC2QUS-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240303/202403030335.VHvC2QUS-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/202403030335.VHvC2QUS-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/pinctrl/nomadik/pinctrl-nomadik.c:1193:22: error: incompatible pointer types initializing 'struct device_node *' with an expression of type 'struct fwnode_handle *' [-Werror,-Wincompatible-pointer-types]
           struct device_node *fwnode = dev_fwnode(&pdev->dev);
                               ^        ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/nomadik/pinctrl-nomadik.c:1222:39: error: incompatible pointer types passing 'struct device_node *' to parameter of type 'const struct fwnode_handle *' [-Werror,-Wincompatible-pointer-types]
                   gpio_fwnode = fwnode_find_reference(fwnode, "nomadik-gpio-chips", i);
                                                       ^~~~~~
   include/linux/property.h:144:73: note: passing argument to parameter 'fwnode' here
   struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode,
                                                                           ^
   drivers/pinctrl/nomadik/pinctrl-nomadik.c:1236:38: error: incompatible pointer types passing 'struct device_node *' to parameter of type 'const struct fwnode_handle *' [-Werror,-Wincompatible-pointer-types]
           prcm_fwnode = fwnode_find_reference(fwnode, "prcm", 0);
                                               ^~~~~~
   include/linux/property.h:144:73: note: passing argument to parameter 'fwnode' here
   struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode,
                                                                           ^
>> drivers/pinctrl/nomadik/pinctrl-nomadik.c:1236:14: error: incompatible pointer types assigning to 'struct device_node *' from 'struct fwnode_handle *' [-Werror,-Wincompatible-pointer-types]
           prcm_fwnode = fwnode_find_reference(fwnode, "prcm", 0);
                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/nomadik/pinctrl-nomadik.c:1238:34: error: incompatible pointer types passing 'struct device_node *' to parameter of type 'struct fwnode_handle *' [-Werror,-Wincompatible-pointer-types]
                   npct->prcm_base = fwnode_iomap(prcm_fwnode, 0);
                                                  ^~~~~~~~~~~
   include/linux/property.h:452:50: note: passing argument to parameter 'fwnode' here
   void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index);
                                                    ^
   drivers/pinctrl/nomadik/pinctrl-nomadik.c:1239:21: error: incompatible pointer types passing 'struct device_node *' to parameter of type 'struct fwnode_handle *' [-Werror,-Wincompatible-pointer-types]
                   fwnode_handle_put(prcm_fwnode);
                                     ^~~~~~~~~~~
   include/linux/property.h:190:46: note: passing argument to parameter 'fwnode' here
   void fwnode_handle_put(struct fwnode_handle *fwnode);
                                                ^
   6 errors generated.


vim +1193 drivers/pinctrl/nomadik/pinctrl-nomadik.c

  1190	
  1191	static int nmk_pinctrl_probe(struct platform_device *pdev)
  1192	{
> 1193		struct device_node *fwnode = dev_fwnode(&pdev->dev);
  1194		struct device_node *prcm_fwnode;
  1195		struct nmk_pinctrl *npct;
  1196		uintptr_t version = 0;
  1197		int i;
  1198	
  1199		npct = devm_kzalloc(&pdev->dev, sizeof(*npct), GFP_KERNEL);
  1200		if (!npct)
  1201			return -ENOMEM;
  1202	
  1203		version = (uintptr_t)device_get_match_data(&pdev->dev);
  1204	
  1205		/* Poke in other ASIC variants here */
  1206		if (version == PINCTRL_NMK_STN8815)
  1207			nmk_pinctrl_stn8815_init(&npct->soc);
  1208		if (version == PINCTRL_NMK_DB8500)
  1209			nmk_pinctrl_db8500_init(&npct->soc);
  1210	
  1211		/*
  1212		 * Since we depend on the GPIO chips to provide clock and register base
  1213		 * for the pin control operations, make sure that we have these
  1214		 * populated before we continue. Follow the phandles to instantiate
  1215		 * them. The GPIO portion of the actual hardware may be probed before
  1216		 * or after this point: it shouldn't matter as the APIs are orthogonal.
  1217		 */
  1218		for (i = 0; i < NMK_MAX_BANKS; i++) {
  1219			struct fwnode_handle *gpio_fwnode;
  1220			struct nmk_gpio_chip *nmk_chip;
  1221	
> 1222			gpio_fwnode = fwnode_find_reference(fwnode, "nomadik-gpio-chips", i);
  1223			if (IS_ERR(gpio_fwnode))
  1224				continue;
  1225	
  1226			dev_info(&pdev->dev, "populate NMK GPIO %d \"%pfwP\"\n", i, gpio_fwnode);
  1227			nmk_chip = nmk_gpio_populate_chip(gpio_fwnode, pdev);
  1228			if (IS_ERR(nmk_chip))
  1229				dev_err(&pdev->dev,
  1230					"could not populate nmk chip struct - continue anyway\n");
  1231			fwnode_handle_put(gpio_fwnode);
  1232			/* We are NOT compatible with mobileye,eyeq5-gpio. */
  1233			BUG_ON(nmk_chip->is_mobileye_soc);
  1234		}
  1235	
> 1236		prcm_fwnode = fwnode_find_reference(fwnode, "prcm", 0);
  1237		if (!IS_ERR(prcm_fwnode)) {
> 1238			npct->prcm_base = fwnode_iomap(prcm_fwnode, 0);
  1239			fwnode_handle_put(prcm_fwnode);
  1240		}
  1241		if (!npct->prcm_base) {
  1242			if (version == PINCTRL_NMK_STN8815) {
  1243				dev_info(&pdev->dev,
  1244					 "No PRCM base, assuming no ALT-Cx control is available\n");
  1245			} else {
  1246				dev_err(&pdev->dev, "missing PRCM base address\n");
  1247				return -EINVAL;
  1248			}
  1249		}
  1250	
  1251		nmk_pinctrl_desc.pins = npct->soc->pins;
  1252		nmk_pinctrl_desc.npins = npct->soc->npins;
  1253		npct->dev = &pdev->dev;
  1254	
  1255		npct->pctl = devm_pinctrl_register(&pdev->dev, &nmk_pinctrl_desc, npct);
  1256		if (IS_ERR(npct->pctl)) {
  1257			dev_err(&pdev->dev, "could not register Nomadik pinctrl driver\n");
  1258			return PTR_ERR(npct->pctl);
  1259		}
  1260	
  1261		platform_set_drvdata(pdev, npct);
  1262		dev_info(&pdev->dev, "initialized Nomadik pin control driver\n");
  1263	
  1264		return 0;
  1265	}
  1266	

-- 
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