devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of_irq.h: fix build warnings when CONFIG_OF is not enabled
@ 2013-09-02 15:54 Randy Dunlap
  2013-09-03 22:31 ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2013-09-02 15:54 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton, Grant Likely, Rob Herring, devicetree

From: Randy Dunlap <rdunlap@infradead.org>

Fix build warnings when CONFIG_OF is not enabled:

include/linux/of_irq.h:82:7: warning: 'struct device_node' declared inside parameter list [enabled by default]
include/linux/of_irq.h:82:7: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/linux/of_irq.h:87:47: warning: 'struct device_node' declared inside parameter list [enabled by default]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc:	Grant Likely <grant.likely@linaro.org>
Cc:	Rob Herring <rob.herring@calxeda.com>
Cc:	devicetree@vger.kernel.org
---
 include/linux/of_irq.h |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20130830.orig/include/linux/of_irq.h
+++ linux-next-20130830/include/linux/of_irq.h
@@ -78,6 +78,8 @@ extern void of_irq_init(const struct of_
 #endif /* CONFIG_OF_IRQ */
 
 #else /* !CONFIG_OF */
+struct device_node;
+
 static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
 						int index)
 {

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

* Re: [PATCH] of_irq.h: fix build warnings when CONFIG_OF is not enabled
  2013-09-02 15:54 [PATCH] of_irq.h: fix build warnings when CONFIG_OF is not enabled Randy Dunlap
@ 2013-09-03 22:31 ` Rob Herring
  2013-09-03 23:18   ` Randy Dunlap
  2013-09-03 23:25   ` [PATCH v2] " Randy Dunlap
  0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring @ 2013-09-03 22:31 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: LKML, Andrew Morton, Grant Likely, Rob Herring,
	devicetree@vger.kernel.org

On Mon, Sep 2, 2013 at 10:54 AM, Randy Dunlap <rdunlap@infradead.org> wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Fix build warnings when CONFIG_OF is not enabled:

It would be nice to know what arch/config you see this on.

> include/linux/of_irq.h:82:7: warning: 'struct device_node' declared inside parameter list [enabled by default]
> include/linux/of_irq.h:82:7: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> include/linux/of_irq.h:87:47: warning: 'struct device_node' declared inside parameter list [enabled by default]
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc:     Grant Likely <grant.likely@linaro.org>
> Cc:     Rob Herring <rob.herring@calxeda.com>
> Cc:     devicetree@vger.kernel.org
> ---
>  include/linux/of_irq.h |    2 ++
>  1 file changed, 2 insertions(+)
>
> --- linux-next-20130830.orig/include/linux/of_irq.h
> +++ linux-next-20130830/include/linux/of_irq.h
> @@ -78,6 +78,8 @@ extern void of_irq_init(const struct of_
>  #endif /* CONFIG_OF_IRQ */
>
>  #else /* !CONFIG_OF */
> +struct device_node;

Can you move this outside of the ifdefs to minimize the amount of ifdef'ed code.

Rob

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

* Re: [PATCH] of_irq.h: fix build warnings when CONFIG_OF is not enabled
  2013-09-03 22:31 ` Rob Herring
@ 2013-09-03 23:18   ` Randy Dunlap
  2013-09-03 23:25   ` [PATCH v2] " Randy Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2013-09-03 23:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: LKML, Andrew Morton, Grant Likely, Rob Herring,
	devicetree@vger.kernel.org

On 09/03/13 15:31, Rob Herring wrote:
> On Mon, Sep 2, 2013 at 10:54 AM, Randy Dunlap <rdunlap@infradead.org> wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix build warnings when CONFIG_OF is not enabled:
> 
> It would be nice to know what arch/config you see this on.

i386 and x86_64.

> 
>> include/linux/of_irq.h:82:7: warning: 'struct device_node' declared inside parameter list [enabled by default]
>> include/linux/of_irq.h:82:7: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
>> include/linux/of_irq.h:87:47: warning: 'struct device_node' declared inside parameter list [enabled by default]
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc:     Grant Likely <grant.likely@linaro.org>
>> Cc:     Rob Herring <rob.herring@calxeda.com>
>> Cc:     devicetree@vger.kernel.org
>> ---
>>  include/linux/of_irq.h |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> --- linux-next-20130830.orig/include/linux/of_irq.h
>> +++ linux-next-20130830/include/linux/of_irq.h
>> @@ -78,6 +78,8 @@ extern void of_irq_init(const struct of_
>>  #endif /* CONFIG_OF_IRQ */
>>
>>  #else /* !CONFIG_OF */
>> +struct device_node;
> 
> Can you move this outside of the ifdefs to minimize the amount of ifdef'ed code.

I'm build testing that change now, but it seems odd to have it there in 2 ways
when CONFIG_OF is enabled:


struct device_node;

#if defined(CONFIG_OF)

#include <linux/of.h>



will resend the patch shortly.

-- 
~Randy

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

* [PATCH v2] of_irq.h: fix build warnings when CONFIG_OF is not enabled
  2013-09-03 22:31 ` Rob Herring
  2013-09-03 23:18   ` Randy Dunlap
@ 2013-09-03 23:25   ` Randy Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2013-09-03 23:25 UTC (permalink / raw)
  To: Rob Herring
  Cc: LKML, Andrew Morton, Grant Likely, Rob Herring,
	devicetree@vger.kernel.org

From: Randy Dunlap <rdunlap@infradead.org>

Fix build warnings when CONFIG_OF is not enabled:
(seen on i386 and x86_64)

include/linux/of_irq.h:82:7: warning: 'struct device_node' declared inside parameter list [enabled by default]
include/linux/of_irq.h:82:7: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/linux/of_irq.h:87:47: warning: 'struct device_node' declared inside parameter list [enabled by default]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc:	Grant Likely <grant.likely@linaro.org>
Cc:	Rob Herring <rob.herring@calxeda.com>
Cc:	devicetree@vger.kernel.org
---
 include/linux/of_irq.h |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20130830.orig/include/linux/of_irq.h
+++ linux-next-20130830/include/linux/of_irq.h
@@ -1,6 +1,8 @@
 #ifndef __OF_IRQ_H
 #define __OF_IRQ_H
 
+struct device_node;
+
 #if defined(CONFIG_OF)
 struct of_irq;
 #include <linux/types.h>

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

end of thread, other threads:[~2013-09-03 23:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 15:54 [PATCH] of_irq.h: fix build warnings when CONFIG_OF is not enabled Randy Dunlap
2013-09-03 22:31 ` Rob Herring
2013-09-03 23:18   ` Randy Dunlap
2013-09-03 23:25   ` [PATCH v2] " Randy Dunlap

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).