[pinctrl:for-next 59/63] drivers//pinctrl/pinctrl-st.c:1212:15: error: implicit declaration of function 'of_get_named_gpio'; did you mean 'of_get_address'?

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

 



tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git for-next
head:   2295f64645cbc4f9ca3002f12d1b36cff3d04ac5
commit: 712dfdaf62b6f6deb21d4c58c4e4261872b0ba9f [59/63] pinctrl: st: Include the right header
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 712dfdaf62b6f6deb21d4c58c4e4261872b0ba9f
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

   drivers//pinctrl/pinctrl-st.c: In function 'st_pctl_dt_parse_groups':
>> drivers//pinctrl/pinctrl-st.c:1212:15: error: implicit declaration of function 'of_get_named_gpio'; did you mean 'of_get_address'? [-Werror=implicit-function-declaration]
      conf->pin = of_get_named_gpio(pins, pp->name, 0);
                  ^~~~~~~~~~~~~~~~~
                  of_get_address
   cc1: some warnings being treated as errors

vim +1212 drivers//pinctrl/pinctrl-st.c

701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1157  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1158  /*
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1159   * Each pin is represented in of the below forms.
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1160   * <bank offset mux direction rt_type rt_delay rt_clk>
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1161   */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1162  static int st_pctl_dt_parse_groups(struct device_node *np,
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1163  	struct st_pctl_group *grp, struct st_pinctrl *info, int idx)
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1164  {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1165  	/* bank pad direction val altfunction */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1166  	const __be32 *list;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1167  	struct property *pp;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1168  	struct st_pinconf *conf;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1169  	struct device_node *pins;
483d70d73beaec Wen Yang            2019-04-12  1170  	int i = 0, npins = 0, nr_props, ret = 0;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1171  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1172  	pins = of_get_child_by_name(np, "st,pins");
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1173  	if (!pins)
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1174  		return -ENODATA;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1175  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1176  	for_each_property_of_node(pins, pp) {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1177  		/* Skip those we do not want to proceed */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1178  		if (!strcmp(pp->name, "name"))
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1179  			continue;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1180  
95bdb0ea3668d8 Heinrich Schuchardt 2016-11-05  1181  		if (pp->length / sizeof(__be32) >= OF_GPIO_ARGS_MIN) {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1182  			npins++;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1183  		} else {
94f4e54cecaf3e Rob Herring         2018-08-27  1184  			pr_warn("Invalid st,pins in %pOFn node\n", np);
483d70d73beaec Wen Yang            2019-04-12  1185  			ret = -EINVAL;
483d70d73beaec Wen Yang            2019-04-12  1186  			goto out_put_node;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1187  		}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1188  	}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1189  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1190  	grp->npins = npins;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1191  	grp->name = np->name;
a86854d0c599b3 Kees Cook           2018-06-12  1192  	grp->pins = devm_kcalloc(info->dev, npins, sizeof(u32), GFP_KERNEL);
a86854d0c599b3 Kees Cook           2018-06-12  1193  	grp->pin_conf = devm_kcalloc(info->dev,
a86854d0c599b3 Kees Cook           2018-06-12  1194  					npins, sizeof(*conf), GFP_KERNEL);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1195  
483d70d73beaec Wen Yang            2019-04-12  1196  	if (!grp->pins || !grp->pin_conf) {
483d70d73beaec Wen Yang            2019-04-12  1197  		ret = -ENOMEM;
483d70d73beaec Wen Yang            2019-04-12  1198  		goto out_put_node;
483d70d73beaec Wen Yang            2019-04-12  1199  	}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1200  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1201  	/* <bank offset mux direction rt_type rt_delay rt_clk> */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1202  	for_each_property_of_node(pins, pp) {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1203  		if (!strcmp(pp->name, "name"))
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1204  			continue;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1205  		nr_props = pp->length/sizeof(u32);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1206  		list = pp->value;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1207  		conf = &grp->pin_conf[i];
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1208  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1209  		/* bank & offset */
1f978217a0c687 Rickard Strandqvist 2014-06-26  1210  		be32_to_cpup(list++);
1f978217a0c687 Rickard Strandqvist 2014-06-26  1211  		be32_to_cpup(list++);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20 @1212  		conf->pin = of_get_named_gpio(pins, pp->name, 0);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1213  		conf->name = pp->name;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1214  		grp->pins[i] = conf->pin;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1215  		/* mux */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1216  		conf->altfunc = be32_to_cpup(list++);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1217  		conf->config = 0;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1218  		/* direction */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1219  		conf->config |= be32_to_cpup(list++);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1220  		/* rt_type rt_delay rt_clk */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1221  		if (nr_props >= OF_GPIO_ARGS_MIN + OF_RT_ARGS_MIN) {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1222  			/* rt_type */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1223  			conf->config |= be32_to_cpup(list++);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1224  			/* rt_delay */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1225  			conf->config |= be32_to_cpup(list++);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1226  			/* rt_clk */
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1227  			if (nr_props > OF_GPIO_ARGS_MIN + OF_RT_ARGS_MIN)
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1228  				conf->config |= be32_to_cpup(list++);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1229  		}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1230  		i++;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1231  	}
483d70d73beaec Wen Yang            2019-04-12  1232  
483d70d73beaec Wen Yang            2019-04-12  1233  out_put_node:
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1234  	of_node_put(pins);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1235  
483d70d73beaec Wen Yang            2019-04-12  1236  	return ret;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1237  }
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1238  

:::::: The code at line 1212 was first introduced by commit
:::::: 701016c0cba594d5dbd26652ed1e52b0fe2926fd pinctrl: st: Add pinctrl and pinconf support.

:::::: TO: Srinivas KANDAGATLA <srinivas.kandagatla@xxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>

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

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