linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the tty tree
@ 2018-09-11  2:58 Stephen Rothwell
  2018-09-11  8:23 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stephen Rothwell @ 2018-09-11  2:58 UTC (permalink / raw)
  To: Greg KH
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Radu Pirea,
	Lee Jones, Andy Shevchenko, Rob Herring, Nicolas Ferre

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

Hi Greg,

After merging the tty tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/mfd/at91-usart.c:51:34: error: array type has incomplete element type 'struct of_device_id'
 static const struct of_device_id at91_usart_mode_of_match[] = {
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/mfd/at91-usart.c:52:4: error: field name not in record or union initializer
  { .compatible = "atmel,at91rm9200-usart" },
    ^
drivers/mfd/at91-usart.c:52:4: note: (near initialization for 'at91_usart_mode_of_match')
drivers/mfd/at91-usart.c:53:4: error: field name not in record or union initializer
  { .compatible = "atmel,at91sam9260-usart" },
    ^
drivers/mfd/at91-usart.c:53:4: note: (near initialization for 'at91_usart_mode_of_match')
drivers/mfd/at91-usart.c:51:34: warning: 'at91_usart_mode_of_match' defined but not used [-Wunused-variable]
 static const struct of_device_id at91_usart_mode_of_match[] = {
                                  ^~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

  7d3aa342cef7 ("mfd: at91-usart: Add MFD driver for USART")

Forgot to include <linux/mod_devicetable.h>?

I used the version of the tty tree from next-20180910 for today.



-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: linux-next: build failure after merge of the tty tree
  2018-09-11  2:58 linux-next: build failure after merge of the tty tree Stephen Rothwell
@ 2018-09-11  8:23 ` Greg KH
  2018-09-11  8:25 ` Lee Jones
  2018-09-11  8:44 ` [PATCH] mfd: at91-usart: fix missing mod_devicetable.h Nicolas Ferre
  2 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2018-09-11  8:23 UTC (permalink / raw)
  To: Stephen Rothwell, Lee Jones
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Radu Pirea,
	Andy Shevchenko, Rob Herring, Nicolas Ferre

On Tue, Sep 11, 2018 at 12:58:57PM +1000, Stephen Rothwell wrote:
> Hi Greg,
> 
> After merging the tty tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> drivers/mfd/at91-usart.c:51:34: error: array type has incomplete element type 'struct of_device_id'
>  static const struct of_device_id at91_usart_mode_of_match[] = {
>                                   ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mfd/at91-usart.c:52:4: error: field name not in record or union initializer
>   { .compatible = "atmel,at91rm9200-usart" },
>     ^
> drivers/mfd/at91-usart.c:52:4: note: (near initialization for 'at91_usart_mode_of_match')
> drivers/mfd/at91-usart.c:53:4: error: field name not in record or union initializer
>   { .compatible = "atmel,at91sam9260-usart" },
>     ^
> drivers/mfd/at91-usart.c:53:4: note: (near initialization for 'at91_usart_mode_of_match')
> drivers/mfd/at91-usart.c:51:34: warning: 'at91_usart_mode_of_match' defined but not used [-Wunused-variable]
>  static const struct of_device_id at91_usart_mode_of_match[] = {
>                                   ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   7d3aa342cef7 ("mfd: at91-usart: Add MFD driver for USART")
> 
> Forgot to include <linux/mod_devicetable.h>?
> 
> I used the version of the tty tree from next-20180910 for today.

Very odd, I just pulled in the "Immutable" branch from Lee here.

Lee, is there something I am missing to get this to build properly?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: linux-next: build failure after merge of the tty tree
  2018-09-11  2:58 linux-next: build failure after merge of the tty tree Stephen Rothwell
  2018-09-11  8:23 ` Greg KH
@ 2018-09-11  8:25 ` Lee Jones
  2018-09-11  8:32   ` Nicolas Ferre
  2018-09-11  8:44 ` [PATCH] mfd: at91-usart: fix missing mod_devicetable.h Nicolas Ferre
  2 siblings, 1 reply; 9+ messages in thread
From: Lee Jones @ 2018-09-11  8:25 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Greg KH, Linux-Next Mailing List, Linux Kernel Mailing List,
	Radu Pirea, Andy Shevchenko, Rob Herring, Nicolas Ferre

On Tue, 11 Sep 2018, Stephen Rothwell wrote:

> Hi Greg,
> 
> After merging the tty tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> drivers/mfd/at91-usart.c:51:34: error: array type has incomplete element type 'struct of_device_id'
>  static const struct of_device_id at91_usart_mode_of_match[] = {
>                                   ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mfd/at91-usart.c:52:4: error: field name not in record or union initializer
>   { .compatible = "atmel,at91rm9200-usart" },
>     ^
> drivers/mfd/at91-usart.c:52:4: note: (near initialization for 'at91_usart_mode_of_match')
> drivers/mfd/at91-usart.c:53:4: error: field name not in record or union initializer
>   { .compatible = "atmel,at91sam9260-usart" },
>     ^
> drivers/mfd/at91-usart.c:53:4: note: (near initialization for 'at91_usart_mode_of_match')
> drivers/mfd/at91-usart.c:51:34: warning: 'at91_usart_mode_of_match' defined but not used [-Wunused-variable]
>  static const struct of_device_id at91_usart_mode_of_match[] = {
>                                   ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   7d3aa342cef7 ("mfd: at91-usart: Add MFD driver for USART")
> 
> Forgot to include <linux/mod_devicetable.h>?

Looks like a missing Device Tree header <linux/of.h>.

Will chase this today and follow up with another PR.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: linux-next: build failure after merge of the tty tree
  2018-09-11  8:25 ` Lee Jones
@ 2018-09-11  8:32   ` Nicolas Ferre
  2018-09-11  8:43     ` Lee Jones
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Ferre @ 2018-09-11  8:32 UTC (permalink / raw)
  To: Lee Jones, Stephen Rothwell, Greg KH
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Radu Pirea,
	Andy Shevchenko, Rob Herring

On 11/09/2018 at 10:25, Lee Jones wrote:
> On Tue, 11 Sep 2018, Stephen Rothwell wrote:
> 
>> Hi Greg,
>>
>> After merging the tty tree, today's linux-next build (arm
>> multi_v7_defconfig) failed like this:
>>
>> drivers/mfd/at91-usart.c:51:34: error: array type has incomplete element type 'struct of_device_id'
>>   static const struct of_device_id at91_usart_mode_of_match[] = {
>>                                    ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/mfd/at91-usart.c:52:4: error: field name not in record or union initializer
>>    { .compatible = "atmel,at91rm9200-usart" },
>>      ^
>> drivers/mfd/at91-usart.c:52:4: note: (near initialization for 'at91_usart_mode_of_match')
>> drivers/mfd/at91-usart.c:53:4: error: field name not in record or union initializer
>>    { .compatible = "atmel,at91sam9260-usart" },
>>      ^
>> drivers/mfd/at91-usart.c:53:4: note: (near initialization for 'at91_usart_mode_of_match')
>> drivers/mfd/at91-usart.c:51:34: warning: 'at91_usart_mode_of_match' defined but not used [-Wunused-variable]
>>   static const struct of_device_id at91_usart_mode_of_match[] = {
>>                                    ^~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Caused by commit
>>
>>    7d3aa342cef7 ("mfd: at91-usart: Add MFD driver for USART")
>>
>> Forgot to include <linux/mod_devicetable.h>?
> 
> Looks like a missing Device Tree header <linux/of.h>.
> 
> Will chase this today and follow up with another PR.

Hi all,

Actually it is due to the missing of  <linux/mod_devicetable.h> as 
Stephen suggested. It is due to the patch ac3167257b9f ("headers: 
separate linux/mod_devicetable.h from linux/platform_device.h") merged 
in v4.19-rc1.

because linux/platform_device.h was included by linux/mfd/core.h that is 
present in this driver. This is why the issue was not identified beforehand.

I'm building a tiny patch to address this right now.

Thanks for your help. Best regards,
-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: linux-next: build failure after merge of the tty tree
  2018-09-11  8:32   ` Nicolas Ferre
@ 2018-09-11  8:43     ` Lee Jones
  2018-09-18  4:54       ` Andy Shevchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Lee Jones @ 2018-09-11  8:43 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Stephen Rothwell, Greg KH, Linux-Next Mailing List,
	Linux Kernel Mailing List, Radu Pirea, Andy Shevchenko,
	Rob Herring

On Tue, 11 Sep 2018, Nicolas Ferre wrote:

> On 11/09/2018 at 10:25, Lee Jones wrote:
> > On Tue, 11 Sep 2018, Stephen Rothwell wrote:
> > 
> > > Hi Greg,
> > > 
> > > After merging the tty tree, today's linux-next build (arm
> > > multi_v7_defconfig) failed like this:
> > > 
> > > drivers/mfd/at91-usart.c:51:34: error: array type has incomplete element type 'struct of_device_id'
> > >   static const struct of_device_id at91_usart_mode_of_match[] = {
> > >                                    ^~~~~~~~~~~~~~~~~~~~~~~~
> > > drivers/mfd/at91-usart.c:52:4: error: field name not in record or union initializer
> > >    { .compatible = "atmel,at91rm9200-usart" },
> > >      ^
> > > drivers/mfd/at91-usart.c:52:4: note: (near initialization for 'at91_usart_mode_of_match')
> > > drivers/mfd/at91-usart.c:53:4: error: field name not in record or union initializer
> > >    { .compatible = "atmel,at91sam9260-usart" },
> > >      ^
> > > drivers/mfd/at91-usart.c:53:4: note: (near initialization for 'at91_usart_mode_of_match')
> > > drivers/mfd/at91-usart.c:51:34: warning: 'at91_usart_mode_of_match' defined but not used [-Wunused-variable]
> > >   static const struct of_device_id at91_usart_mode_of_match[] = {
> > >                                    ^~~~~~~~~~~~~~~~~~~~~~~~
> > > 
> > > Caused by commit
> > > 
> > >    7d3aa342cef7 ("mfd: at91-usart: Add MFD driver for USART")
> > > 
> > > Forgot to include <linux/mod_devicetable.h>?
> > 
> > Looks like a missing Device Tree header <linux/of.h>.
> > 
> > Will chase this today and follow up with another PR.
> 
> Hi all,
> 
> Actually it is due to the missing of  <linux/mod_devicetable.h> as Stephen
> suggested. It is due to the patch ac3167257b9f ("headers: separate
> linux/mod_devicetable.h from linux/platform_device.h") merged in v4.19-rc1.

Since this set uses Device Tree, it really should include the of.h.

This solves the issue reported above.

I will fix-up and re-send the pull-request.

> because linux/platform_device.h was included by linux/mfd/core.h that is
> present in this driver. This is why the issue was not identified beforehand.
> 
> I'm building a tiny patch to address this right now.
> 
> Thanks for your help. Best regards,

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] mfd: at91-usart: fix missing mod_devicetable.h
  2018-09-11  2:58 linux-next: build failure after merge of the tty tree Stephen Rothwell
  2018-09-11  8:23 ` Greg KH
  2018-09-11  8:25 ` Lee Jones
@ 2018-09-11  8:44 ` Nicolas Ferre
  2018-09-11  9:02   ` Greg KH
  2018-09-11  9:36   ` Lee Jones
  2 siblings, 2 replies; 9+ messages in thread
From: Nicolas Ferre @ 2018-09-11  8:44 UTC (permalink / raw)
  To: greg, lee.jones; +Cc: sfr, Radu Pirea, linux-next, linux-arm-kernel

Following the inclusion of the patch ac3167257b9f ("headers:
separate linux/mod_devicetable.h from linux/platform_device.h"), there is a
build issue:

drivers/mfd/at91-usart.c:51:34: error: array type has incomplete element type
'struct of_device_id'
  static const struct of_device_id at91_usart_mode_of_match[] = {

Before this patch, the definition was reached by its inclusion of
linux/mfd/core.h.

The build issue is solved by simply adding the mod_devicetable.h in this
driver.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>
---
 drivers/mfd/at91-usart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/at91-usart.c b/drivers/mfd/at91-usart.c
index a4b9929c156f..ad743b8ca6be 100644
--- a/drivers/mfd/at91-usart.c
+++ b/drivers/mfd/at91-usart.c
@@ -11,6 +11,7 @@
 #include <dt-bindings/mfd/at91-usart.h>
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/mfd/core.h>
 #include <linux/property.h>
 
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: at91-usart: fix missing mod_devicetable.h
  2018-09-11  8:44 ` [PATCH] mfd: at91-usart: fix missing mod_devicetable.h Nicolas Ferre
@ 2018-09-11  9:02   ` Greg KH
  2018-09-11  9:36   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Greg KH @ 2018-09-11  9:02 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: sfr, Radu Pirea, linux-next, lee.jones, linux-arm-kernel

On Tue, Sep 11, 2018 at 10:44:48AM +0200, Nicolas Ferre wrote:
> Following the inclusion of the patch ac3167257b9f ("headers:
> separate linux/mod_devicetable.h from linux/platform_device.h"), there is a
> build issue:
> 
> drivers/mfd/at91-usart.c:51:34: error: array type has incomplete element type
> 'struct of_device_id'
>   static const struct of_device_id at91_usart_mode_of_match[] = {
> 
> Before this patch, the definition was reached by its inclusion of
> linux/mfd/core.h.
> 
> The build issue is solved by simply adding the mod_devicetable.h in this
> driver.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>

You forgot a "reported-by" :(

I'll go add it...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: at91-usart: fix missing mod_devicetable.h
  2018-09-11  8:44 ` [PATCH] mfd: at91-usart: fix missing mod_devicetable.h Nicolas Ferre
  2018-09-11  9:02   ` Greg KH
@ 2018-09-11  9:36   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Lee Jones @ 2018-09-11  9:36 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: greg, Radu Pirea, linux-next, linux-arm-kernel, sfr

On Tue, 11 Sep 2018, Nicolas Ferre wrote:

> Following the inclusion of the patch ac3167257b9f ("headers:
> separate linux/mod_devicetable.h from linux/platform_device.h"), there is a
> build issue:
> 
> drivers/mfd/at91-usart.c:51:34: error: array type has incomplete element type
> 'struct of_device_id'
>   static const struct of_device_id at91_usart_mode_of_match[] = {
> 
> Before this patch, the definition was reached by its inclusion of
> linux/mfd/core.h.
> 
> The build issue is solved by simply adding the mod_devicetable.h in this
> driver.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>
> ---
>  drivers/mfd/at91-usart.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/at91-usart.c b/drivers/mfd/at91-usart.c
> index a4b9929c156f..ad743b8ca6be 100644
> --- a/drivers/mfd/at91-usart.c
> +++ b/drivers/mfd/at91-usart.c
> @@ -11,6 +11,7 @@
>  #include <dt-bindings/mfd/at91-usart.h>
>  
>  #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/mfd/core.h>
>  #include <linux/property.h>

Since this driver is using Device Tree, it is more correct to simply
add <linux/of.h>, unless of course we are also going to remove
<linux/mod_devicetable.h> from <linux/of.h>.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: linux-next: build failure after merge of the tty tree
  2018-09-11  8:43     ` Lee Jones
@ 2018-09-18  4:54       ` Andy Shevchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Shevchenko @ 2018-09-18  4:54 UTC (permalink / raw)
  To: Lee Jones
  Cc: Nicolas Ferre, Stephen Rothwell, Greg KH, linux-next,
	Linux Kernel Mailing List, Radu Pirea, Rob Herring

On Tue, Sep 11, 2018 at 11:43 AM Lee Jones <lee.jones@linaro.org> wrote:
> On Tue, 11 Sep 2018, Nicolas Ferre wrote:

> > Actually it is due to the missing of  <linux/mod_devicetable.h> as Stephen
> > suggested. It is due to the patch ac3167257b9f ("headers: separate
> > linux/mod_devicetable.h from linux/platform_device.h") merged in v4.19-rc1.
>
> Since this set uses Device Tree, it really should include the of.h.

I didn't remember the contents of the driver, but I would disagree on
a statement that
*using* of_device_id table implies necessity of linux/of.h inclusion.

>
> This solves the issue reported above.
>
> I will fix-up and re-send the pull-request.


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-18  4:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-11  2:58 linux-next: build failure after merge of the tty tree Stephen Rothwell
2018-09-11  8:23 ` Greg KH
2018-09-11  8:25 ` Lee Jones
2018-09-11  8:32   ` Nicolas Ferre
2018-09-11  8:43     ` Lee Jones
2018-09-18  4:54       ` Andy Shevchenko
2018-09-11  8:44 ` [PATCH] mfd: at91-usart: fix missing mod_devicetable.h Nicolas Ferre
2018-09-11  9:02   ` Greg KH
2018-09-11  9:36   ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).