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

From: Stephen Rothwell
Date: Mon Apr 10 2023 - 22:29:03 EST


Hi all,

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

drivers/cpufreq/acpi-cpufreq.c:1024:15: error: variable 'acpi_cpufreq_platdrv' has initializer but incomplete type
1024 | static struct platform_driver acpi_cpufreq_platdrv = {
| ^~~~~~~~~~~~~~~
drivers/cpufreq/acpi-cpufreq.c:1025:10: error: 'struct platform_driver' has no member named 'driver'
1025 | .driver = {
| ^~~~~~
drivers/cpufreq/acpi-cpufreq.c:1025:19: error: extra brace group at end of initializer
1025 | .driver = {
| ^
drivers/cpufreq/acpi-cpufreq.c:1025:19: note: (near initialization for 'acpi_cpufreq_platdrv')
drivers/cpufreq/acpi-cpufreq.c:1025:19: error: excess elements in struct initializer [-Werror]
drivers/cpufreq/acpi-cpufreq.c:1025:19: note: (near initialization for 'acpi_cpufreq_platdrv')
drivers/cpufreq/acpi-cpufreq.c:1028:10: error: 'struct platform_driver' has no member named 'remove'
1028 | .remove = acpi_cpufreq_remove,
| ^~~~~~
drivers/cpufreq/acpi-cpufreq.c:1028:27: error: excess elements in struct initializer [-Werror]
1028 | .remove = acpi_cpufreq_remove,
| ^~~~~~~~~~~~~~~~~~~
drivers/cpufreq/acpi-cpufreq.c:1028:27: note: (near initialization for 'acpi_cpufreq_platdrv')
drivers/cpufreq/acpi-cpufreq.c: In function 'acpi_cpufreq_init':
drivers/cpufreq/acpi-cpufreq.c:1033:16: error: implicit declaration of function 'platform_driver_probe' [-Werror=implicit-function-declaration]
1033 | return platform_driver_probe(&acpi_cpufreq_platdrv, acpi_cpufreq_probe);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/cpufreq/acpi-cpufreq.c: In function 'acpi_cpufreq_exit':
drivers/cpufreq/acpi-cpufreq.c:1038:9: error: implicit declaration of function 'platform_driver_unregister'; did you mean 'driver_unregister'? [-Werror=implicit-function-declaration]
1038 | platform_driver_unregister(&acpi_cpufreq_platdrv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| driver_unregister
drivers/cpufreq/acpi-cpufreq.c: At top level:
drivers/cpufreq/acpi-cpufreq.c:1024:31: error: storage size of 'acpi_cpufreq_platdrv' isn't known
1024 | static struct platform_driver acpi_cpufreq_platdrv = {
| ^~~~~~~~~~~~~~~~~~~~

I am not sure which of the include file update commits were the direct
cause but they interacted with commit

691a63712347 ("ACPI: cpufreq: Use platform devices to load ACPI PPC and PCC drivers")

from the pm tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Tue, 11 Apr 2023 12:15:29 +1000
Subject: [PATCH] devicetree: fix up for include rationalisation

interacting with "ACPI: cpufreq: Use platform devices to load ACPI PPC and PCC drivers"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
drivers/cpufreq/acpi-cpufreq.c | 1 +
drivers/cpufreq/pcc-cpufreq.c | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index e1a5384cf21c..29904395e95f 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -20,6 +20,7 @@
#include <linux/dmi.h>
#include <linux/slab.h>
#include <linux/string_helpers.h>
+#include <linux/platform_device.h>

#include <linux/acpi.h>
#include <linux/io.h>
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 0c362932ca60..b4318a1a9335 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -36,6 +36,7 @@
#include <linux/io.h>
#include <linux/spinlock.h>
#include <linux/uaccess.h>
+#include <linux/platform_device.h>

#include <acpi/processor.h>

--
2.39.2

--
Cheers,
Stephen Rothwell

Attachment: pgpKFcqQlg2zk.pgp
Description: OpenPGP digital signature