All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Rob Herring <robherring2@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] of_irq.h: fix build warnings when CONFIG_OF is not enabled
Date: Tue, 03 Sep 2013 16:18:27 -0700	[thread overview]
Message-ID: <52266E43.70102@infradead.org> (raw)
In-Reply-To: <CAL_Jsq+82vm_vt5EpcG1zvWmL_H4KY=91tB1WH5yUhHsiM11DA@mail.gmail.com>

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

  reply	other threads:[~2013-09-03 23:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-09-03 23:25   ` [PATCH v2] " Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52266E43.70102@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=robherring2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.