tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel head: dab6558f57c8632d90dd75e00da78877a1dcf243 commit: c12fb1774deaa9c9408b19db8d43d3612f6e47a0 [85/91] pinctrl: bcm: add Northstar driver config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 c12fb1774deaa9c9408b19db8d43d3612f6e47a0 # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=arm64 All warnings (new ones prefixed by >>): drivers/pinctrl/bcm/pinctrl-ns.c: In function 'ns_pinctrl_probe': >> drivers/pinctrl/bcm/pinctrl-ns.c:288:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ns_pinctrl->chipset_flag = (unsigned int)of_id->data; ^ drivers/pinctrl/bcm/pinctrl-ns.c:310:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] unsigned int chipsets = (unsigned int)src->drv_data; ^ vim +288 drivers/pinctrl/bcm/pinctrl-ns.c 262 263 static int ns_pinctrl_probe(struct platform_device *pdev) 264 { 265 struct device *dev = &pdev->dev; 266 const struct of_device_id *of_id; 267 struct ns_pinctrl *ns_pinctrl; 268 struct pinctrl_desc *pctldesc; 269 struct pinctrl_pin_desc *pin; 270 struct ns_pinctrl_group *group; 271 struct ns_pinctrl_function *function; 272 struct resource *res; 273 int i; 274 275 ns_pinctrl = devm_kzalloc(dev, sizeof(*ns_pinctrl), GFP_KERNEL); 276 if (!ns_pinctrl) 277 return -ENOMEM; 278 pctldesc = &ns_pinctrl->pctldesc; 279 platform_set_drvdata(pdev, ns_pinctrl); 280 281 /* Set basic properties */ 282 283 ns_pinctrl->dev = dev; 284 285 of_id = of_match_device(ns_pinctrl_of_match_table, dev); 286 if (!of_id) 287 return -EINVAL; > 288 ns_pinctrl->chipset_flag = (unsigned int)of_id->data; 289 290 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 291 "cru_gpio_control"); 292 ns_pinctrl->base = devm_ioremap_resource(dev, res); 293 if (IS_ERR(ns_pinctrl->base)) { 294 dev_err(dev, "Failed to map pinctrl regs\n"); 295 return PTR_ERR(ns_pinctrl->base); 296 } 297 298 memcpy(pctldesc, &ns_pinctrl_desc, sizeof(*pctldesc)); 299 300 /* Set pinctrl properties */ 301 302 pctldesc->pins = devm_kcalloc(dev, ARRAY_SIZE(ns_pinctrl_pins), 303 sizeof(struct pinctrl_pin_desc), 304 GFP_KERNEL); 305 if (!pctldesc->pins) 306 return -ENOMEM; 307 for (i = 0, pin = (struct pinctrl_pin_desc *)&pctldesc->pins[0]; 308 i < ARRAY_SIZE(ns_pinctrl_pins); i++) { 309 const struct pinctrl_pin_desc *src = &ns_pinctrl_pins[i]; 310 unsigned int chipsets = (unsigned int)src->drv_data; 311 312 if (chipsets & ns_pinctrl->chipset_flag) { 313 memcpy(pin++, src, sizeof(*src)); 314 pctldesc->npins++; 315 } 316 } 317 318 ns_pinctrl->groups = devm_kcalloc(dev, ARRAY_SIZE(ns_pinctrl_groups), 319 sizeof(struct ns_pinctrl_group), 320 GFP_KERNEL); 321 if (!ns_pinctrl->groups) 322 return -ENOMEM; 323 for (i = 0, group = &ns_pinctrl->groups[0]; 324 i < ARRAY_SIZE(ns_pinctrl_groups); i++) { 325 const struct ns_pinctrl_group *src = &ns_pinctrl_groups[i]; 326 327 if (src->chipsets & ns_pinctrl->chipset_flag) { 328 memcpy(group++, src, sizeof(*src)); 329 ns_pinctrl->num_groups++; 330 } 331 } 332 333 ns_pinctrl->functions = devm_kcalloc(dev, 334 ARRAY_SIZE(ns_pinctrl_functions), 335 sizeof(struct ns_pinctrl_function), 336 GFP_KERNEL); 337 if (!ns_pinctrl->functions) 338 return -ENOMEM; 339 for (i = 0, function = &ns_pinctrl->functions[0]; 340 i < ARRAY_SIZE(ns_pinctrl_functions); i++) { 341 const struct ns_pinctrl_function *src = &ns_pinctrl_functions[i]; 342 343 if (src->chipsets & ns_pinctrl->chipset_flag) { 344 memcpy(function++, src, sizeof(*src)); 345 ns_pinctrl->num_functions++; 346 } 347 } 348 349 /* Register */ 350 351 ns_pinctrl->pctldev = devm_pinctrl_register(dev, pctldesc, ns_pinctrl); 352 if (IS_ERR(ns_pinctrl->pctldev)) { 353 dev_err(dev, "Failed to register pinctrl\n"); 354 return PTR_ERR(ns_pinctrl->pctldev); 355 } 356 357 return 0; 358 } 359 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip