devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: Define of_irq_find_parent dummy for !defined(CONFIG_OF_IRQ)
@ 2013-08-27  7:57 Andreas Larsson
  2013-08-27 13:12 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Larsson @ 2013-08-27  7:57 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: devicetree, linux-kernel, Lars Poeschel, software

This changes the dummy version of of_irq_find_parent to be defined when
!defined(CONFIG_OF_IRQ) instead of when !defined(CONFIG_OF). Without
this of_irq_find_parent is undefined on SPARC that defines CONFIG_OF but
not CONFIG_OF_IRQ.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
 include/linux/of_irq.h |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index 535cecf..d0059a9 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -83,11 +83,13 @@ static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
 {
 	return 0;
 }
+#endif /* !CONFIG_OF */
+
+#endif /* __OF_IRQ_H */
 
+#if !defined(CONFIG_OF_IRQ)
 static inline void *of_irq_find_parent(struct device_node *child)
 {
 	return NULL;
 }
-#endif /* !CONFIG_OF */
-
-#endif /* __OF_IRQ_H */
+#endif /* !CONFIG_OF_IRQ */
-- 
1.7.10.4

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

* Re: [PATCH] of: Define of_irq_find_parent dummy for !defined(CONFIG_OF_IRQ)
  2013-08-27  7:57 [PATCH] of: Define of_irq_find_parent dummy for !defined(CONFIG_OF_IRQ) Andreas Larsson
@ 2013-08-27 13:12 ` Rob Herring
  2013-08-27 13:21   ` Andreas Larsson
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2013-08-27 13:12 UTC (permalink / raw)
  To: Andreas Larsson
  Cc: Grant Likely, Rob Herring, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Lars Poeschel, software

On Tue, Aug 27, 2013 at 2:57 AM, Andreas Larsson <andreas@gaisler.com> wrote:
> This changes the dummy version of of_irq_find_parent to be defined when
> !defined(CONFIG_OF_IRQ) instead of when !defined(CONFIG_OF). Without
> this of_irq_find_parent is undefined on SPARC that defines CONFIG_OF but
> not CONFIG_OF_IRQ.

Can you give me some clue about where the failure is. This function
has been here a while, so what changed?

Rob

>
> Signed-off-by: Andreas Larsson <andreas@gaisler.com>
> ---
>  include/linux/of_irq.h |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
> index 535cecf..d0059a9 100644
> --- a/include/linux/of_irq.h
> +++ b/include/linux/of_irq.h
> @@ -83,11 +83,13 @@ static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
>  {
>         return 0;
>  }
> +#endif /* !CONFIG_OF */
> +
> +#endif /* __OF_IRQ_H */
>
> +#if !defined(CONFIG_OF_IRQ)
>  static inline void *of_irq_find_parent(struct device_node *child)
>  {
>         return NULL;
>  }
> -#endif /* !CONFIG_OF */
> -
> -#endif /* __OF_IRQ_H */
> +#endif /* !CONFIG_OF_IRQ */
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] of: Define of_irq_find_parent dummy for !defined(CONFIG_OF_IRQ)
  2013-08-27 13:12 ` Rob Herring
@ 2013-08-27 13:21   ` Andreas Larsson
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Larsson @ 2013-08-27 13:21 UTC (permalink / raw)
  To: Rob Herring
  Cc: Grant Likely, Rob Herring, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Lars Poeschel, software

On 2013-08-27 15:12, Rob Herring wrote:
> On Tue, Aug 27, 2013 at 2:57 AM, Andreas Larsson <andreas@gaisler.com> wrote:
>> This changes the dummy version of of_irq_find_parent to be defined when
>> !defined(CONFIG_OF_IRQ) instead of when !defined(CONFIG_OF). Without
>> this of_irq_find_parent is undefined on SPARC that defines CONFIG_OF but
>> not CONFIG_OF_IRQ.
>
> Can you give me some clue about where the failure is. This function
> has been here a while, so what changed?

There is no failure as far as I know at the moment.

An earlier version of a submitted patch concerning gpiolib-of.c 
triggered compile failure on SPARC due to this situation (not an issue 
in the latest version of that patch)

It is more of a failure waiting to happen, so this can wait until v3.12.

Cheers,
Andreas Larsson

> Rob
>
>>
>> Signed-off-by: Andreas Larsson <andreas@gaisler.com>
>> ---
>>   include/linux/of_irq.h |    8 +++++---
>>   1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
>> index 535cecf..d0059a9 100644
>> --- a/include/linux/of_irq.h
>> +++ b/include/linux/of_irq.h
>> @@ -83,11 +83,13 @@ static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
>>   {
>>          return 0;
>>   }
>> +#endif /* !CONFIG_OF */
>> +
>> +#endif /* __OF_IRQ_H */
>>
>> +#if !defined(CONFIG_OF_IRQ)
>>   static inline void *of_irq_find_parent(struct device_node *child)
>>   {
>>          return NULL;
>>   }
>> -#endif /* !CONFIG_OF */
>> -
>> -#endif /* __OF_IRQ_H */
>> +#endif /* !CONFIG_OF_IRQ */
>> --
>> 1.7.10.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2013-08-27 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27  7:57 [PATCH] of: Define of_irq_find_parent dummy for !defined(CONFIG_OF_IRQ) Andreas Larsson
2013-08-27 13:12 ` Rob Herring
2013-08-27 13:21   ` Andreas Larsson

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