tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git ib-nomadik-gpio head: efaa90ed2cff038f12c077e9b040b97ac362b09c commit: efaa90ed2cff038f12c077e9b040b97ac362b09c [28/28] gpio: nomadik: Back out some managed resources config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240307/202403070558.ud4m0mNn-lkp@xxxxxxxxx/config) compiler: sh4-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240307/202403070558.ud4m0mNn-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/202403070558.ud4m0mNn-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from include/linux/device.h:15, from include/linux/platform_device.h:13, from drivers/gpio/gpio-nomadik.c:28: drivers/gpio/gpio-nomadik.c: In function 'nmk_gpio_populate_chip': >> drivers/gpio/gpio-nomadik.c:588:30: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'long int' [-Wformat=] 588 | dev_err(dev, "failed getting reset control: %pe\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/gpio/gpio-nomadik.c:588:17: note: in expansion of macro 'dev_err' 588 | dev_err(dev, "failed getting reset control: %pe\n", | ^~~~~~~ drivers/gpio/gpio-nomadik.c:588:62: note: format string is defined here 588 | dev_err(dev, "failed getting reset control: %pe\n", | ~^ | | | void * | %ld vim +588 drivers/gpio/gpio-nomadik.c 543 544 nmk_chip = devm_kzalloc(dev, sizeof(*nmk_chip), GFP_KERNEL); 545 if (!nmk_chip) { 546 platform_device_put(gpio_pdev); 547 return ERR_PTR(-ENOMEM); 548 } 549 550 if (device_property_read_u32(gpio_dev, "ngpios", &ngpio)) { 551 ngpio = NMK_GPIO_PER_CHIP; 552 dev_dbg(dev, "populate: using default ngpio (%u)\n", ngpio); 553 } 554 555 nmk_chip->is_mobileye_soc = device_is_compatible(gpio_dev, 556 "mobileye,eyeq5-gpio"); 557 nmk_chip->bank = id; 558 chip = &nmk_chip->chip; 559 chip->base = -1; 560 chip->ngpio = ngpio; 561 chip->label = dev_name(gpio_dev); 562 chip->parent = gpio_dev; 563 564 /* NOTE: different devices! No devm_platform_ioremap_resource() here! */ 565 res = platform_get_resource(gpio_pdev, IORESOURCE_MEM, 0); 566 base = devm_ioremap_resource(dev, res); 567 if (IS_ERR(base)) { 568 platform_device_put(gpio_pdev); 569 return ERR_CAST(base); 570 } 571 nmk_chip->addr = base; 572 573 /* NOTE: do not use devm_ here! */ 574 clk = clk_get_optional(gpio_dev, NULL); 575 if (IS_ERR(clk)) { 576 platform_device_put(gpio_pdev); 577 return ERR_CAST(clk); 578 } 579 clk_prepare(clk); 580 nmk_chip->clk = clk; 581 582 /* NOTE: do not use devm_ here! */ 583 reset = reset_control_get_optional_shared(gpio_dev, NULL); 584 if (IS_ERR(reset)) { 585 clk_unprepare(clk); 586 clk_put(clk); 587 platform_device_put(gpio_pdev); > 588 dev_err(dev, "failed getting reset control: %pe\n", 589 PTR_ERR(reset)); 590 return ERR_CAST(reset); 591 } 592 593 /* 594 * Reset might be shared and asserts/deasserts calls are unbalanced. We 595 * only support sharing this reset with other gpio-nomadik devices that 596 * use this reset to ensure deassertion at probe. 597 */ 598 ret = reset_control_deassert(reset); 599 if (ret) { 600 reset_control_put(reset); 601 clk_unprepare(clk); 602 clk_put(clk); 603 platform_device_put(gpio_pdev); 604 dev_err(dev, "failed reset deassert: %d\n", ret); 605 return ERR_PTR(ret); 606 } 607 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki