From: Tobias Klauser <tklauser@distanz.ch>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Gyungoh Yoo <gyungoh@gmail.com>,
rdunlap@infradead.org, robh+dt@kernel.org, pawel.moll@arm.com,
mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
galak@codeaurora.org, jg1.han@samsung.com, cooloney@gmail.com,
plagnioj@jcrosoft.com, tomi.valkeinen@ti.com,
grant.likely@linaro.org, sameo@linux.intel.com,
lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org,
jack.yoo@skyworksinc.com, florian.vaussard@epfl.ch,
jason@lakedaemon.net, andrew@lunn.ch, silvio.fricke@gmail.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] Adding a support for Skyworks SKY81452
Date: Fri, 08 Aug 2014 07:20:38 +0000 [thread overview]
Message-ID: <20140808072037.GD29832@distanz.ch> (raw)
In-Reply-To: <20140808070913.GB5387@ulmo>
On 2014-08-08 at 09:09:19 +0200, Thierry Reding <thierry.reding@gmail.com> wrote:
> On Thu, Aug 07, 2014 at 02:34:39PM +0200, Tobias Klauser wrote:
> > On 2014-08-07 at 10:05:38 +0200, Gyungoh Yoo <gyungoh@gmail.com> wrote:
> [...]
> > > +#ifdef CONFIG_OF
> > > +static const struct of_device_id sky81452_of_match[] = {
> > > + {.compatible = "sky,sky81452",},
> > > + { }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, sky81452_of_match);
> > > +#endif
> >
> > The #ifdefery here is not needed since you use of_match_ptr below, whcih
> > will expand to NULL of CONFIG_OF is not set.
>
> On the contrary, that's exactly why the #ifdef is needed here. If you
> don't guard the OF match table here, then of_match_ptr() evaluating to
> NULL will cause the table to become unused and the compiler warning
> about it.
Oops, yes of course. Sorry about that and thanks for your correction.
Tobias
WARNING: multiple messages have this Message-ID (diff)
From: Tobias Klauser <tklauser@distanz.ch>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Gyungoh Yoo <gyungoh@gmail.com>,
rdunlap@infradead.org, robh+dt@kernel.org, pawel.moll@arm.com,
mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
galak@codeaurora.org, jg1.han@samsung.com, cooloney@gmail.com,
plagnioj@jcrosoft.com, tomi.valkeinen@ti.com,
grant.likely@linaro.org, sameo@linux.intel.com,
lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org,
jack.yoo@skyworksinc.com, florian.vaussard@epfl.ch,
jason@lakedaemon.net, andrew@lunn.ch, silvio.fricke@gmail.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] Adding a support for Skyworks SKY81452
Date: Fri, 8 Aug 2014 09:20:38 +0200 [thread overview]
Message-ID: <20140808072037.GD29832@distanz.ch> (raw)
In-Reply-To: <20140808070913.GB5387@ulmo>
On 2014-08-08 at 09:09:19 +0200, Thierry Reding <thierry.reding@gmail.com> wrote:
> On Thu, Aug 07, 2014 at 02:34:39PM +0200, Tobias Klauser wrote:
> > On 2014-08-07 at 10:05:38 +0200, Gyungoh Yoo <gyungoh@gmail.com> wrote:
> [...]
> > > +#ifdef CONFIG_OF
> > > +static const struct of_device_id sky81452_of_match[] = {
> > > + {.compatible = "sky,sky81452",},
> > > + { }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, sky81452_of_match);
> > > +#endif
> >
> > The #ifdefery here is not needed since you use of_match_ptr below, whcih
> > will expand to NULL of CONFIG_OF is not set.
>
> On the contrary, that's exactly why the #ifdef is needed here. If you
> don't guard the OF match table here, then of_match_ptr() evaluating to
> NULL will cause the table to become unused and the compiler warning
> about it.
Oops, yes of course. Sorry about that and thanks for your correction.
Tobias
next prev parent reply other threads:[~2014-08-08 7:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 8:05 [PATCH] Adding a support for Skyworks SKY81452 Gyungoh Yoo
2014-08-07 8:05 ` Gyungoh Yoo
2014-08-07 10:09 ` Lee Jones
2014-08-07 10:09 ` Lee Jones
2014-08-08 6:22 ` Gyungoh Yoo
2014-08-08 6:22 ` Gyungoh Yoo
2014-08-07 12:34 ` Tobias Klauser
2014-08-07 12:34 ` Tobias Klauser
2014-08-08 6:24 ` Gyungoh Yoo
2014-08-08 6:24 ` Gyungoh Yoo
2014-08-08 7:09 ` Thierry Reding
2014-08-08 7:09 ` Thierry Reding
2014-08-08 7:20 ` Tobias Klauser [this message]
2014-08-08 7:20 ` Tobias Klauser
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=20140808072037.GD29832@distanz.ch \
--to=tklauser@distanz.ch \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=cooloney@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=florian.vaussard@epfl.ch \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=gyungoh@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jack.yoo@skyworksinc.com \
--cc=jason@lakedaemon.net \
--cc=jg1.han@samsung.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=plagnioj@jcrosoft.com \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=sameo@linux.intel.com \
--cc=silvio.fricke@gmail.com \
--cc=thierry.reding@gmail.com \
--cc=tomi.valkeinen@ti.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.