linux-next: build failure after merge of the devicetree tree

From: Stephen Rothwell
Date: Wed Dec 06 2023 - 20:58:10 EST


Hi all,

After merging the devicetree tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/auxdisplay/img-ascii-lcd.c: In function 'img_ascii_lcd_probe':
drivers/auxdisplay/img-ascii-lcd.c:234:17: error: implicit declaration of function 'of_match_device'; did you mean 'of_match_node'? [-Werror=implicit-function-declaration]
234 | match = of_match_device(img_ascii_lcd_matches, dev);
| ^~~~~~~~~~~~~~~
| of_match_node
drivers/auxdisplay/img-ascii-lcd.c:234:15: warning: assignment to 'const struct of_device_id *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
234 | match = of_match_device(img_ascii_lcd_matches, dev);
| ^
drivers/firmware/microchip/mpfs-auto-update.c:439:42: warning: 'struct platform_device' declared inside parameter list will not be visible outside of this definition or declaration
439 | static int mpfs_auto_update_probe(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c: In function 'mpfs_auto_update_probe':
drivers/firmware/microchip/mpfs-auto-update.c:441:35: error: invalid use of undefined type 'struct platform_device'
441 | struct device *dev = &pdev->dev;
| ^~
drivers/firmware/microchip/mpfs-auto-update.c:456:9: error: implicit declaration of function 'platform_set_drvdata' [-Werror=implicit-function-declaration]
456 | platform_set_drvdata(pdev, priv);
| ^~~~~~~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c: At top level:
drivers/firmware/microchip/mpfs-auto-update.c:476:44: warning: 'struct platform_device' declared inside parameter list will not be visible outside of this definition or declaration
476 | static void mpfs_auto_update_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c: In function 'mpfs_auto_update_remove':
drivers/firmware/microchip/mpfs-auto-update.c:478:46: error: implicit declaration of function 'platform_get_drvdata' [-Werror=implicit-function-declaration]
478 | struct mpfs_auto_update_priv *priv = platform_get_drvdata(pdev);
| ^~~~~~~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c:478:46: warning: initialization of 'struct mpfs_auto_update_priv *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/firmware/microchip/mpfs-auto-update.c: At top level:
drivers/firmware/microchip/mpfs-auto-update.c:483:15: error: variable 'mpfs_auto_update_driver' has initializer but incomplete type
483 | static struct platform_driver mpfs_auto_update_driver = {
| ^~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c:484:10: error: 'struct platform_driver' has no member named 'driver'
484 | .driver = {
| ^~~~~~
drivers/firmware/microchip/mpfs-auto-update.c:484:19: error: extra brace group at end of initializer
484 | .driver = {
| ^
drivers/firmware/microchip/mpfs-auto-update.c:484:19: note: (near initialization for 'mpfs_auto_update_driver')
drivers/firmware/microchip/mpfs-auto-update.c:484:19: warning: excess elements in struct initializer
drivers/firmware/microchip/mpfs-auto-update.c:484:19: note: (near initialization for 'mpfs_auto_update_driver')
drivers/firmware/microchip/mpfs-auto-update.c:487:10: error: 'struct platform_driver' has no member named 'probe'
487 | .probe = mpfs_auto_update_probe,
| ^~~~~
drivers/firmware/microchip/mpfs-auto-update.c:487:18: warning: excess elements in struct initializer
487 | .probe = mpfs_auto_update_probe,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c:487:18: note: (near initialization for 'mpfs_auto_update_driver')
drivers/firmware/microchip/mpfs-auto-update.c:488:10: error: 'struct platform_driver' has no member named 'remove_new'
488 | .remove_new = mpfs_auto_update_remove,
| ^~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c:488:23: warning: excess elements in struct initializer
488 | .remove_new = mpfs_auto_update_remove,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c:488:23: note: (near initialization for 'mpfs_auto_update_driver')
drivers/firmware/microchip/mpfs-auto-update.c:490:1: warning: data definition has no type or storage class
490 | module_platform_driver(mpfs_auto_update_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c:490:1: error: type defaults to 'int' in declaration of 'module_platform_driver' [-Werror=implicit-int]
drivers/firmware/microchip/mpfs-auto-update.c:490:1: warning: parameter names (without types) in function declaration
drivers/firmware/microchip/mpfs-auto-update.c:483:31: error: storage size of 'mpfs_auto_update_driver' isn't known
483 | static struct platform_driver mpfs_auto_update_driver = {
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/microchip/mpfs-auto-update.c:483:31: warning: 'mpfs_auto_update_driver' defined but not used [-Wunused-variable]
drivers/gpu/drm/bridge/aux-hpd-bridge.c: In function 'drm_aux_hpd_bridge_release':
drivers/gpu/drm/bridge/aux-hpd-bridge.c:27:9: error: implicit declaration of function 'of_node_put' [-Werror=implicit-function-declaration]
27 | of_node_put(adev->dev.platform_data);
| ^~~~~~~~~~~
drivers/tty/serial/esp32_acm.c:367:37: warning: 'struct platform_device' declared inside parameter list will not be visible outside of this definition or declaration
367 | static int esp32s3_acm_probe(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c: In function 'esp32s3_acm_probe':
drivers/tty/serial/esp32_acm.c:369:38: error: invalid use of undefined type 'struct platform_device'
369 | struct device_node *np = pdev->dev.of_node;
| ^~
drivers/tty/serial/esp32_acm.c:374:34: error: invalid use of undefined type 'struct platform_device'
374 | port = devm_kzalloc(&pdev->dev, sizeof(*port), GFP_KERNEL);
| ^~
In file included from include/linux/device.h:15,
from include/linux/cdev.h:8,
from include/linux/tty_driver.h:9,
from include/linux/tty.h:10,
from include/linux/serial_core.h:17,
from drivers/tty/serial/esp32_acm.c:12:
drivers/tty/serial/esp32_acm.c:380:30: error: invalid use of undefined type 'struct platform_device'
380 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret);
| ^~
include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/tty/serial/esp32_acm.c:380:17: note: in expansion of macro 'dev_err'
380 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret);
| ^~~~~~~
drivers/tty/serial/esp32_acm.c:384:30: error: invalid use of undefined type 'struct platform_device'
384 | dev_err(&pdev->dev, "driver limited to %d serial ports\n",
| ^~
include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/tty/serial/esp32_acm.c:384:17: note: in expansion of macro 'dev_err'
384 | dev_err(&pdev->dev, "driver limited to %d serial ports\n",
| ^~~~~~~
drivers/tty/serial/esp32_acm.c:391:15: error: implicit declaration of function 'platform_get_resource' [-Werror=implicit-function-declaration]
391 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c:391:13: warning: assignment to 'struct resource *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
391 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
| ^
drivers/tty/serial/esp32_acm.c:396:52: error: invalid use of undefined type 'struct platform_device'
396 | port->membase = devm_ioremap_resource(&pdev->dev, res);
| ^~
drivers/tty/serial/esp32_acm.c:400:26: error: invalid use of undefined type 'struct platform_device'
400 | port->dev = &pdev->dev;
| ^~
drivers/tty/serial/esp32_acm.c:403:21: error: implicit declaration of function 'platform_get_irq'; did you mean 'platform_notify'? [-Werror=implicit-function-declaration]
403 | port->irq = platform_get_irq(pdev, 0);
| ^~~~~~~~~~~~~~~~
| platform_notify
drivers/tty/serial/esp32_acm.c:411:9: error: implicit declaration of function 'platform_set_drvdata' [-Werror=implicit-function-declaration]
411 | platform_set_drvdata(pdev, port);
| ^~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c: At top level:
drivers/tty/serial/esp32_acm.c:416:38: warning: 'struct platform_device' declared inside parameter list will not be visible outside of this definition or declaration
416 | static int esp32s3_acm_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c: In function 'esp32s3_acm_remove':
drivers/tty/serial/esp32_acm.c:418:34: error: implicit declaration of function 'platform_get_drvdata' [-Werror=implicit-function-declaration]
418 | struct uart_port *port = platform_get_drvdata(pdev);
| ^~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c:418:34: warning: initialization of 'struct uart_port *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/tty/serial/esp32_acm.c: At top level:
drivers/tty/serial/esp32_acm.c:425:15: error: variable 'esp32s3_acm_driver' has initializer but incomplete type
425 | static struct platform_driver esp32s3_acm_driver = {
| ^~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c:426:10: error: 'struct platform_driver' has no member named 'probe'
426 | .probe = esp32s3_acm_probe,
| ^~~~~
drivers/tty/serial/esp32_acm.c:426:27: warning: excess elements in struct initializer
426 | .probe = esp32s3_acm_probe,
| ^~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c:426:27: note: (near initialization for 'esp32s3_acm_driver')
drivers/tty/serial/esp32_acm.c:427:10: error: 'struct platform_driver' has no member named 'remove'
427 | .remove = esp32s3_acm_remove,
| ^~~~~~
drivers/tty/serial/esp32_acm.c:427:27: warning: excess elements in struct initializer
427 | .remove = esp32s3_acm_remove,
| ^~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c:427:27: note: (near initialization for 'esp32s3_acm_driver')
drivers/tty/serial/esp32_acm.c:428:10: error: 'struct platform_driver' has no member named 'driver'
428 | .driver = {
| ^~~~~~
drivers/tty/serial/esp32_acm.c:428:27: error: extra brace group at end of initializer
428 | .driver = {
| ^
drivers/tty/serial/esp32_acm.c:428:27: note: (near initialization for 'esp32s3_acm_driver')
drivers/tty/serial/esp32_acm.c:428:27: warning: excess elements in struct initializer
drivers/tty/serial/esp32_acm.c:428:27: note: (near initialization for 'esp32s3_acm_driver')
drivers/tty/serial/esp32_acm.c: In function 'esp32s3_acm_init':
drivers/tty/serial/esp32_acm.c:442:15: error: implicit declaration of function 'platform_driver_register' [-Werror=implicit-function-declaration]
442 | ret = platform_driver_register(&esp32s3_acm_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_acm.c: In function 'esp32s3_acm_exit':
drivers/tty/serial/esp32_acm.c:451:9: error: implicit declaration of function 'platform_driver_unregister'; did you mean 'driver_unregister'? [-Werror=implicit-function-declaration]
451 | platform_driver_unregister(&esp32s3_acm_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| driver_unregister
drivers/tty/serial/esp32_acm.c: At top level:
drivers/tty/serial/esp32_acm.c:425:31: error: storage size of 'esp32s3_acm_driver' isn't known
425 | static struct platform_driver esp32s3_acm_driver = {
| ^~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c:678:36: warning: 'struct platform_device' declared inside parameter list will not be visible outside of this definition or declaration
678 | static int esp32_uart_probe(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c: In function 'esp32_uart_probe':
drivers/tty/serial/esp32_uart.c:680:38: error: invalid use of undefined type 'struct platform_device'
680 | struct device_node *np = pdev->dev.of_node;
| ^~
drivers/tty/serial/esp32_uart.c:687:57: error: invalid use of undefined type 'struct platform_device'
687 | match = of_match_device(esp32_uart_dt_ids, &pdev->dev);
| ^~
drivers/tty/serial/esp32_uart.c:691:35: error: invalid use of undefined type 'struct platform_device'
691 | sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL);
| ^~
In file included from include/linux/device.h:15,
from include/linux/cdev.h:8,
from include/linux/tty_driver.h:9,
from include/linux/tty.h:10,
from include/linux/serial_core.h:17,
from drivers/tty/serial/esp32_uart.c:13:
drivers/tty/serial/esp32_uart.c:699:30: error: invalid use of undefined type 'struct platform_device'
699 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret);
| ^~
include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/tty/serial/esp32_uart.c:699:17: note: in expansion of macro 'dev_err'
699 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret);
| ^~~~~~~
drivers/tty/serial/esp32_uart.c:703:30: error: invalid use of undefined type 'struct platform_device'
703 | dev_err(&pdev->dev, "driver limited to %d serial ports\n", UART_NR);
| ^~
include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/tty/serial/esp32_uart.c:703:17: note: in expansion of macro 'dev_err'
703 | dev_err(&pdev->dev, "driver limited to %d serial ports\n", UART_NR);
| ^~~~~~~
drivers/tty/serial/esp32_uart.c:709:15: error: implicit declaration of function 'platform_get_resource' [-Werror=implicit-function-declaration]
709 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c:709:13: warning: assignment to 'struct resource *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
709 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
| ^
drivers/tty/serial/esp32_uart.c:714:52: error: invalid use of undefined type 'struct platform_device'
714 | port->membase = devm_ioremap_resource(&pdev->dev, res);
| ^~
drivers/tty/serial/esp32_uart.c:718:40: error: invalid use of undefined type 'struct platform_device'
718 | sport->clk = devm_clk_get(&pdev->dev, NULL);
| ^~
drivers/tty/serial/esp32_uart.c:723:26: error: invalid use of undefined type 'struct platform_device'
723 | port->dev = &pdev->dev;
| ^~
drivers/tty/serial/esp32_uart.c:726:21: error: implicit declaration of function 'platform_get_irq'; did you mean 'platform_notify'? [-Werror=implicit-function-declaration]
726 | port->irq = platform_get_irq(pdev, 0);
| ^~~~~~~~~~~~~~~~
| platform_notify
drivers/tty/serial/esp32_uart.c:735:9: error: implicit declaration of function 'platform_set_drvdata' [-Werror=implicit-function-declaration]
735 | platform_set_drvdata(pdev, port);
| ^~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c: At top level:
drivers/tty/serial/esp32_uart.c:740:37: warning: 'struct platform_device' declared inside parameter list will not be visible outside of this definition or declaration
740 | static int esp32_uart_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c: In function 'esp32_uart_remove':
drivers/tty/serial/esp32_uart.c:742:34: error: implicit declaration of function 'platform_get_drvdata' [-Werror=implicit-function-declaration]
742 | struct uart_port *port = platform_get_drvdata(pdev);
| ^~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c:742:34: warning: initialization of 'struct uart_port *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/tty/serial/esp32_uart.c: At top level:
drivers/tty/serial/esp32_uart.c:750:15: error: variable 'esp32_uart_driver' has initializer but incomplete type
750 | static struct platform_driver esp32_uart_driver = {
| ^~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c:751:10: error: 'struct platform_driver' has no member named 'probe'
751 | .probe = esp32_uart_probe,
| ^~~~~
drivers/tty/serial/esp32_uart.c:751:27: warning: excess elements in struct initializer
751 | .probe = esp32_uart_probe,
| ^~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c:751:27: note: (near initialization for 'esp32_uart_driver')
drivers/tty/serial/esp32_uart.c:752:10: error: 'struct platform_driver' has no member named 'remove'
752 | .remove = esp32_uart_remove,
| ^~~~~~
drivers/tty/serial/esp32_uart.c:752:27: warning: excess elements in struct initializer
752 | .remove = esp32_uart_remove,
| ^~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c:752:27: note: (near initialization for 'esp32_uart_driver')
drivers/tty/serial/esp32_uart.c:753:10: error: 'struct platform_driver' has no member named 'driver'
753 | .driver = {
| ^~~~~~
drivers/tty/serial/esp32_uart.c:753:27: error: extra brace group at end of initializer
753 | .driver = {
| ^
drivers/tty/serial/esp32_uart.c:753:27: note: (near initialization for 'esp32_uart_driver')
drivers/tty/serial/esp32_uart.c:753:27: warning: excess elements in struct initializer
drivers/tty/serial/esp32_uart.c:753:27: note: (near initialization for 'esp32_uart_driver')
drivers/tty/serial/esp32_uart.c: In function 'esp32_uart_init':
drivers/tty/serial/esp32_uart.c:767:15: error: implicit declaration of function 'platform_driver_register' [-Werror=implicit-function-declaration]
767 | ret = platform_driver_register(&esp32_uart_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/esp32_uart.c: In function 'esp32_uart_exit':
drivers/tty/serial/esp32_uart.c:776:9: error: implicit declaration of function 'platform_driver_unregister'; did you mean 'driver_unregister'? [-Werror=implicit-function-declaration]
776 | platform_driver_unregister(&esp32_uart_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| driver_unregister
drivers/tty/serial/esp32_uart.c: At top level:
drivers/tty/serial/esp32_uart.c:750:31: error: storage size of 'esp32_uart_driver' isn't known
750 | static struct platform_driver esp32_uart_driver = {
| ^~~~~~~~~~~~~~~~~

Presumably caused by commit

f793fea7761d ("of: Stop circularly including of_device.h and of_platform.h")

I have used the devicetree tree from next-20231206 for today.

--
Cheers,
Stephen Rothwell

Attachment: pgpzAF7dUxkxM.pgp
Description: OpenPGP digital signature