2023-12-11 05:05:25

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the devicetree tree

Hi all,

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

drivers/clk/qcom/gcc-x1e80100.c:6786:15: error: variable 'gcc_x1e80100_driver' has initializer but incomplete type
6786 | static struct platform_driver gcc_x1e80100_driver = {
| ^~~~~~~~~~~~~~~
drivers/clk/qcom/gcc-x1e80100.c:6787:10: error: 'struct platform_driver' has no member named 'probe'
6787 | .probe = gcc_x1e80100_probe,
| ^~~~~
drivers/clk/qcom/gcc-x1e80100.c:6787:18: warning: excess elements in struct initializer
6787 | .probe = gcc_x1e80100_probe,
| ^~~~~~~~~~~~~~~~~~
drivers/clk/qcom/gcc-x1e80100.c:6787:18: note: (near initialization for 'gcc_x1e80100_driver')
drivers/clk/qcom/gcc-x1e80100.c:6788:10: error: 'struct platform_driver' has no member named 'driver'
6788 | .driver = {
| ^~~~~~
drivers/clk/qcom/gcc-x1e80100.c:6788:19: error: extra brace group at end of initializer
6788 | .driver = {
| ^
drivers/clk/qcom/gcc-x1e80100.c:6788:19: note: (near initialization for 'gcc_x1e80100_driver')
drivers/clk/qcom/gcc-x1e80100.c:6788:19: warning: excess elements in struct initializer
drivers/clk/qcom/gcc-x1e80100.c:6788:19: note: (near initialization for 'gcc_x1e80100_driver')
drivers/clk/qcom/gcc-x1e80100.c: In function 'gcc_x1e80100_init':
drivers/clk/qcom/gcc-x1e80100.c:6796:16: error: implicit declaration of function 'platform_driver_register' [-Werror=implicit-function-declaration]
6796 | return platform_driver_register(&gcc_x1e80100_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/qcom/gcc-x1e80100.c: In function 'gcc_x1e80100_exit':
drivers/clk/qcom/gcc-x1e80100.c:6802:9: error: implicit declaration of function 'platform_driver_unregister'; did you mean 'driver_unregister'? [-Werror=implicit-function-declaration]
6802 | platform_driver_unregister(&gcc_x1e80100_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| driver_unregister
drivers/clk/qcom/gcc-x1e80100.c: At top level:
drivers/clk/qcom/gcc-x1e80100.c:6786:31: error: storage size of 'gcc_x1e80100_driver' isn't known
6786 | static struct platform_driver gcc_x1e80100_driver = {
| ^~~~~~~~~~~~~~~~~~~

Caused by commit

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

interacting with commit

161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")

from the qcom tree.

I have applied the following merge resolution patch. This patch could
be applied to the gcom tree.

From: Stephen Rothwell <[email protected]>
Date: Mon, 11 Dec 2023 15:47:55 +1100
Subject: [PATCH] fix up for "of: Stop circularly including of_device.h and of_platform.h"

interacting with
"clk: qcom: Add Global Clock controller (GCC) driver for X1E80100"

Signed-off-by: Stephen Rothwell <[email protected]>
---
drivers/clk/qcom/gcc-x1e80100.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
index 74db7fef237b..d7182d6e9783 100644
--- a/drivers/clk/qcom/gcc-x1e80100.c
+++ b/drivers/clk/qcom/gcc-x1e80100.c
@@ -4,8 +4,9 @@
*/

#include <linux/clk-provider.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/platform_device.h>
#include <linux/regmap.h>

#include <dt-bindings/clock/qcom,x1e80100-gcc.h>
--
2.40.1

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2023-12-12 09:04:59

by Sibi Sankar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the devicetree tree



On 12/11/23 10:35, Stephen Rothwell wrote:
> Hi all,

Hey Stephen,
Thanks for the fix.

>
> After merging the devicetree tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/clk/qcom/gcc-x1e80100.c:6786:15: error: variable 'gcc_x1e80100_driver' has initializer but incomplete type
> 6786 | static struct platform_driver gcc_x1e80100_driver = {
> | ^~~~~~~~~~~~~~~
> drivers/clk/qcom/gcc-x1e80100.c:6787:10: error: 'struct platform_driver' has no member named 'probe'
> 6787 | .probe = gcc_x1e80100_probe,
> | ^~~~~
> drivers/clk/qcom/gcc-x1e80100.c:6787:18: warning: excess elements in struct initializer
> 6787 | .probe = gcc_x1e80100_probe,
> | ^~~~~~~~~~~~~~~~~~
> drivers/clk/qcom/gcc-x1e80100.c:6787:18: note: (near initialization for 'gcc_x1e80100_driver')
> drivers/clk/qcom/gcc-x1e80100.c:6788:10: error: 'struct platform_driver' has no member named 'driver'
> 6788 | .driver = {
> | ^~~~~~
> drivers/clk/qcom/gcc-x1e80100.c:6788:19: error: extra brace group at end of initializer
> 6788 | .driver = {
> | ^
> drivers/clk/qcom/gcc-x1e80100.c:6788:19: note: (near initialization for 'gcc_x1e80100_driver')
> drivers/clk/qcom/gcc-x1e80100.c:6788:19: warning: excess elements in struct initializer
> drivers/clk/qcom/gcc-x1e80100.c:6788:19: note: (near initialization for 'gcc_x1e80100_driver')
> drivers/clk/qcom/gcc-x1e80100.c: In function 'gcc_x1e80100_init':
> drivers/clk/qcom/gcc-x1e80100.c:6796:16: error: implicit declaration of function 'platform_driver_register' [-Werror=implicit-function-declaration]
> 6796 | return platform_driver_register(&gcc_x1e80100_driver);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/clk/qcom/gcc-x1e80100.c: In function 'gcc_x1e80100_exit':
> drivers/clk/qcom/gcc-x1e80100.c:6802:9: error: implicit declaration of function 'platform_driver_unregister'; did you mean 'driver_unregister'? [-Werror=implicit-function-declaration]
> 6802 | platform_driver_unregister(&gcc_x1e80100_driver);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> | driver_unregister
> drivers/clk/qcom/gcc-x1e80100.c: At top level:
> drivers/clk/qcom/gcc-x1e80100.c:6786:31: error: storage size of 'gcc_x1e80100_driver' isn't known
> 6786 | static struct platform_driver gcc_x1e80100_driver = {
> | ^~~~~~~~~~~~~~~~~~~
>
> Caused by commit
>
> 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")
>
> interacting with commit
>
> 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
>
> from the qcom tree.
>
> I have applied the following merge resolution patch. This patch could
> be applied to the gcom tree.
>
> From: Stephen Rothwell <[email protected]>
> Date: Mon, 11 Dec 2023 15:47:55 +1100
> Subject: [PATCH] fix up for "of: Stop circularly including of_device.h and of_platform.h"
>
> interacting with
> "clk: qcom: Add Global Clock controller (GCC) driver for X1E80100"
>
> Signed-off-by: Stephen Rothwell <[email protected]>

Reviewed-by: Sibi Sankar <[email protected]>

> ---
> drivers/clk/qcom/gcc-x1e80100.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
> index 74db7fef237b..d7182d6e9783 100644
> --- a/drivers/clk/qcom/gcc-x1e80100.c
> +++ b/drivers/clk/qcom/gcc-x1e80100.c
> @@ -4,8 +4,9 @@
> */
>
> #include <linux/clk-provider.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/platform_device.h>
> #include <linux/regmap.h>
>
> #include <dt-bindings/clock/qcom,x1e80100-gcc.h>

2024-01-19 00:59:02

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the devicetree tree

Hi all,

On Mon, 11 Dec 2023 16:05:10 +1100 Stephen Rothwell <[email protected]> wrote:
>
> After merging the devicetree tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/clk/qcom/gcc-x1e80100.c:6786:15: error: variable 'gcc_x1e80100_driver' has initializer but incomplete type
> 6786 | static struct platform_driver gcc_x1e80100_driver = {
> | ^~~~~~~~~~~~~~~
> drivers/clk/qcom/gcc-x1e80100.c:6787:10: error: 'struct platform_driver' has no member named 'probe'
> 6787 | .probe = gcc_x1e80100_probe,
> | ^~~~~
> drivers/clk/qcom/gcc-x1e80100.c:6787:18: warning: excess elements in struct initializer
> 6787 | .probe = gcc_x1e80100_probe,
> | ^~~~~~~~~~~~~~~~~~
> drivers/clk/qcom/gcc-x1e80100.c:6787:18: note: (near initialization for 'gcc_x1e80100_driver')
> drivers/clk/qcom/gcc-x1e80100.c:6788:10: error: 'struct platform_driver' has no member named 'driver'
> 6788 | .driver = {
> | ^~~~~~
> drivers/clk/qcom/gcc-x1e80100.c:6788:19: error: extra brace group at end of initializer
> 6788 | .driver = {
> | ^
> drivers/clk/qcom/gcc-x1e80100.c:6788:19: note: (near initialization for 'gcc_x1e80100_driver')
> drivers/clk/qcom/gcc-x1e80100.c:6788:19: warning: excess elements in struct initializer
> drivers/clk/qcom/gcc-x1e80100.c:6788:19: note: (near initialization for 'gcc_x1e80100_driver')
> drivers/clk/qcom/gcc-x1e80100.c: In function 'gcc_x1e80100_init':
> drivers/clk/qcom/gcc-x1e80100.c:6796:16: error: implicit declaration of function 'platform_driver_register' [-Werror=implicit-function-declaration]
> 6796 | return platform_driver_register(&gcc_x1e80100_driver);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/clk/qcom/gcc-x1e80100.c: In function 'gcc_x1e80100_exit':
> drivers/clk/qcom/gcc-x1e80100.c:6802:9: error: implicit declaration of function 'platform_driver_unregister'; did you mean 'driver_unregister'? [-Werror=implicit-function-declaration]
> 6802 | platform_driver_unregister(&gcc_x1e80100_driver);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> | driver_unregister
> drivers/clk/qcom/gcc-x1e80100.c: At top level:
> drivers/clk/qcom/gcc-x1e80100.c:6786:31: error: storage size of 'gcc_x1e80100_driver' isn't known
> 6786 | static struct platform_driver gcc_x1e80100_driver = {
> | ^~~~~~~~~~~~~~~~~~~
>
> Caused by commit
>
> 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")
>
> interacting with commit
>
> 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
>
> from the qcom tree.
>
> I have applied the following merge resolution patch. This patch could
> be applied to the gcom tree.
>
> From: Stephen Rothwell <[email protected]>
> Date: Mon, 11 Dec 2023 15:47:55 +1100
> Subject: [PATCH] fix up for "of: Stop circularly including of_device.h and of_platform.h"
>
> interacting with
> "clk: qcom: Add Global Clock controller (GCC) driver for X1E80100"
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> drivers/clk/qcom/gcc-x1e80100.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
> index 74db7fef237b..d7182d6e9783 100644
> --- a/drivers/clk/qcom/gcc-x1e80100.c
> +++ b/drivers/clk/qcom/gcc-x1e80100.c
> @@ -4,8 +4,9 @@
> */
>
> #include <linux/clk-provider.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/platform_device.h>
> #include <linux/regmap.h>
>
> #include <dt-bindings/clock/qcom,x1e80100-gcc.h>
> --
> 2.40.1

Did this get lost somewhere among the merges? I am still applying the patch
to linux-next.
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2024-01-19 14:08:32

by Rob Herring

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the devicetree tree

On Thu, Jan 18, 2024 at 6:58 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> On Mon, 11 Dec 2023 16:05:10 +1100 Stephen Rothwell <[email protected]> wrote:
> >
> > After merging the devicetree tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > drivers/clk/qcom/gcc-x1e80100.c:6786:15: error: variable 'gcc_x1e80100_driver' has initializer but incomplete type
> > 6786 | static struct platform_driver gcc_x1e80100_driver = {
> > | ^~~~~~~~~~~~~~~
> > drivers/clk/qcom/gcc-x1e80100.c:6787:10: error: 'struct platform_driver' has no member named 'probe'
> > 6787 | .probe = gcc_x1e80100_probe,
> > | ^~~~~
> > drivers/clk/qcom/gcc-x1e80100.c:6787:18: warning: excess elements in struct initializer
> > 6787 | .probe = gcc_x1e80100_probe,
> > | ^~~~~~~~~~~~~~~~~~
> > drivers/clk/qcom/gcc-x1e80100.c:6787:18: note: (near initialization for 'gcc_x1e80100_driver')
> > drivers/clk/qcom/gcc-x1e80100.c:6788:10: error: 'struct platform_driver' has no member named 'driver'
> > 6788 | .driver = {
> > | ^~~~~~
> > drivers/clk/qcom/gcc-x1e80100.c:6788:19: error: extra brace group at end of initializer
> > 6788 | .driver = {
> > | ^
> > drivers/clk/qcom/gcc-x1e80100.c:6788:19: note: (near initialization for 'gcc_x1e80100_driver')
> > drivers/clk/qcom/gcc-x1e80100.c:6788:19: warning: excess elements in struct initializer
> > drivers/clk/qcom/gcc-x1e80100.c:6788:19: note: (near initialization for 'gcc_x1e80100_driver')
> > drivers/clk/qcom/gcc-x1e80100.c: In function 'gcc_x1e80100_init':
> > drivers/clk/qcom/gcc-x1e80100.c:6796:16: error: implicit declaration of function 'platform_driver_register' [-Werror=implicit-function-declaration]
> > 6796 | return platform_driver_register(&gcc_x1e80100_driver);
> > | ^~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/clk/qcom/gcc-x1e80100.c: In function 'gcc_x1e80100_exit':
> > drivers/clk/qcom/gcc-x1e80100.c:6802:9: error: implicit declaration of function 'platform_driver_unregister'; did you mean 'driver_unregister'? [-Werror=implicit-function-declaration]
> > 6802 | platform_driver_unregister(&gcc_x1e80100_driver);
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> > | driver_unregister
> > drivers/clk/qcom/gcc-x1e80100.c: At top level:
> > drivers/clk/qcom/gcc-x1e80100.c:6786:31: error: storage size of 'gcc_x1e80100_driver' isn't known
> > 6786 | static struct platform_driver gcc_x1e80100_driver = {
> > | ^~~~~~~~~~~~~~~~~~~
> >
> > Caused by commit
> >
> > 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")
> >
> > interacting with commit
> >
> > 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
> >
> > from the qcom tree.
> >
> > I have applied the following merge resolution patch. This patch could
> > be applied to the gcom tree.
> >
> > From: Stephen Rothwell <[email protected]>
> > Date: Mon, 11 Dec 2023 15:47:55 +1100
> > Subject: [PATCH] fix up for "of: Stop circularly including of_device.h and of_platform.h"
> >
> > interacting with
> > "clk: qcom: Add Global Clock controller (GCC) driver for X1E80100"
> >
> > Signed-off-by: Stephen Rothwell <[email protected]>
> > ---
> > drivers/clk/qcom/gcc-x1e80100.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
> > index 74db7fef237b..d7182d6e9783 100644
> > --- a/drivers/clk/qcom/gcc-x1e80100.c
> > +++ b/drivers/clk/qcom/gcc-x1e80100.c
> > @@ -4,8 +4,9 @@
> > */
> >
> > #include <linux/clk-provider.h>
> > +#include <linux/mod_devicetable.h>
> > #include <linux/module.h>
> > -#include <linux/of_device.h>
> > +#include <linux/platform_device.h>
> > #include <linux/regmap.h>
> >
> > #include <dt-bindings/clock/qcom,x1e80100-gcc.h>
> > --
> > 2.40.1
>
> Did this get lost somewhere among the merges? I am still applying the patch
> to linux-next.

Thanks for pointing that out. I guess the QCom folks never applied it.
I'm going to send the final patch to Linus today and will add this one
in.

Rob