Hi larry.lai, kernel test robot noticed the following build warnings: [auto build test WARNING on lee-mfd/for-mfd-fixes] [also build test WARNING on pavel-leds/for-next] [cannot apply to lee-mfd/for-mfd-next linusw-pinctrl/devel linusw-pinctrl/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/larry-lai/pinctrl-Add-support-pin-control-for-UP-board-CPLD-FPGA/20230809-013857 base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-fixes patch link: https://lore.kernel.org/r/20230808145601.9401-2-larry.lai%40yunjingtech.com patch subject: [PATCH V5 1/3] mfd: Add support for UP board CPLD/FPGA config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20230810/202308101112.LWcBvo24-lkp@xxxxxxxxx/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20230810/202308101112.LWcBvo24-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/202308101112.LWcBvo24-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> drivers/mfd/upboard-fpga.c:344:5: warning: no previous prototype for 'upboard_led_gpio_register' [-Wmissing-prototypes] 344 | int upboard_led_gpio_register(struct upboard_fpga *fpga) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/upboard-fpga.c: In function 'upboard_fpga_probe': >> drivers/mfd/upboard-fpga.c:460:30: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 460 | ddata->regmap_config = fpga_data->regmap_config; | ^ vim +/upboard_led_gpio_register +344 drivers/mfd/upboard-fpga.c 343 > 344 int upboard_led_gpio_register(struct upboard_fpga *fpga) 345 { 346 struct gpio_led blue_led, yellow_led, green_led, red_led; 347 struct gpio_desc *desc; 348 static struct gpio_led leds[4]; 349 int num_leds = 0; 350 int ret; 351 352 desc = devm_gpiod_get(fpga->dev, "blue", GPIOD_OUT_LOW); 353 if (!IS_ERR(desc)) { 354 blue_led.name = "upboard:blue:"; 355 blue_led.gpio = desc_to_gpio(desc); 356 blue_led.default_state = LEDS_GPIO_DEFSTATE_KEEP; 357 leds[num_leds++] = blue_led; 358 devm_gpiod_put(fpga->dev, desc); 359 } 360 361 desc = devm_gpiod_get(fpga->dev, "yellow", GPIOD_OUT_LOW); 362 if (!IS_ERR(desc)) { 363 yellow_led.name = "upboard:yellow:"; 364 yellow_led.gpio = desc_to_gpio(desc); 365 yellow_led.default_state = LEDS_GPIO_DEFSTATE_KEEP; 366 leds[num_leds++] = yellow_led; 367 devm_gpiod_put(fpga->dev, desc); 368 } 369 370 desc = devm_gpiod_get(fpga->dev, "green", GPIOD_OUT_LOW); 371 if (!IS_ERR(desc)) { 372 green_led.name = "upboard:green:"; 373 green_led.gpio = desc_to_gpio(desc); 374 green_led.default_state = LEDS_GPIO_DEFSTATE_KEEP; 375 leds[num_leds++] = green_led; 376 devm_gpiod_put(fpga->dev, desc); 377 } 378 379 desc = devm_gpiod_get(fpga->dev, "red", GPIOD_OUT_LOW); 380 if (!IS_ERR(desc)) { 381 red_led.name = "upboard:red:"; 382 red_led.gpio = desc_to_gpio(desc); 383 red_led.default_state = LEDS_GPIO_DEFSTATE_KEEP; 384 leds[num_leds++] = red_led; 385 devm_gpiod_put(fpga->dev, desc); 386 } 387 388 /* No optional LEDs defined */ 389 if (num_leds == 0) 390 return 0; 391 392 pdata.num_leds = num_leds; 393 pdata.leds = leds; 394 395 ret = devm_mfd_add_devices(fpga->dev, PLATFORM_DEVID_AUTO, 396 upboard_gpio_led_cells, 397 ARRAY_SIZE(upboard_gpio_led_cells), 398 NULL, 0, NULL); 399 if (ret) { 400 dev_err(fpga->dev, "Failed to add GPIO LEDs, %d", ret); 401 return ret; 402 } 403 404 return 0; 405 } 406 407 /* 408 * -------------------------------------- ------------ 409 * | Intel SOC,1.8V | --- |ADC Chip | native driver 410 * | GPIO/I2C/SPI/UART/PWM | |SPI/I2C | 411 * -------------------------------------- ------------- 412 * | | 413 * ---------------------------------------------------------- 414 * | CPLD/FPGA Driver | upboard-fpga CPLD control driver 415 * | provide more GPIO driving power | register leds-upboard 416 * | HAT 40 pin mux function | register pinctrl-upboard 417 * --------------------------------------------------------- 418 * | | 419 * ---------- ------------------------------------------- 420 * |3 or 4| | HAT 40 pins, 3.3V | leds-upboard 421 * | Leds | |GPIO/ADC/I2C/SPI/UART/PWM | pinctrl-upboard 422 * ---------- ------------------------------------------- 423 */ 424 static const struct acpi_device_id upboard_fpga_acpi_match[] = { 425 { "AANT0000", (kernel_ulong_t)&upboard_pinctrl_data }, 426 { "AANT0F00", (kernel_ulong_t)&upboard_up_fpga_data }, 427 { "AANT0F01", (kernel_ulong_t)&upboard_up2_fpga_data }, 428 { "AANT0F02", (kernel_ulong_t)&upboard_up_fpga_data }, 429 { "AANT0F03", (kernel_ulong_t)&upboard_upcore_crst02_fpga_data }, 430 { "AANT0F04", (kernel_ulong_t)&upboard_up_fpga_data }, 431 { } 432 }; 433 MODULE_DEVICE_TABLE(acpi, upboard_fpga_acpi_match); 434 435 static int __init upboard_fpga_probe(struct platform_device *pdev) 436 { 437 struct device *dev = &pdev->dev; 438 struct upboard_fpga *ddata; 439 const struct acpi_device_id *id; 440 const struct upboard_fpga_data *fpga_data; 441 int ret; 442 443 id = acpi_match_device(upboard_fpga_acpi_match, dev); 444 if (!id) 445 return -ENODEV; 446 447 fpga_data = (const struct upboard_fpga_data *) id->driver_data; 448 449 ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL); 450 if (!ddata) 451 return -ENOMEM; 452 453 platform_set_drvdata(pdev, ddata); 454 ddata->dev = dev; 455 456 ddata->regmap = devm_regmap_init(dev, NULL, ddata, fpga_data->regmap_config); 457 if (IS_ERR(ddata->regmap)) 458 return PTR_ERR(ddata->regmap); 459 > 460 ddata->regmap_config = fpga_data->regmap_config; 461 462 ret = upboard_fpga_gpio_init(ddata); 463 if (ret) { 464 /* Not FPGA firmware, abort FPGA GPIO initialize process */ 465 dev_warn(dev, "Failed to initialize FPGA common GPIOs: %d", ret); 466 } else { 467 upboard_fpga_verify_device(ddata); 468 } 469 470 ret = upboard_led_gpio_register(ddata); 471 if (ret) { 472 /* LEDs are optional. */ 473 dev_warn(dev, "Failed to register LEDs: %d", ret); 474 } 475 476 return devm_mfd_add_devices(dev, PLATFORM_DEVID_AUTO, 477 fpga_data->cells, 478 fpga_data->ncells, 479 NULL, 0, NULL); 480 } 481 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki