All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: "Jon Medhurst (Tixy)" <tixy@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree-discuss@lists.ozlabs.org" 
	<devicetree-discuss@lists.ozlabs.org>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Pawel Moll <Pawel.Moll@arm.com>,
	Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>,
	Achin Gupta <Achin.Gupta@arm.com>,
	Amit Kucheria <amit.kucheria@linaro.org>
Subject: Re: [RFC PATCH v2 2/2] drivers: mfd: vexpress: add Serial Power Controller (SPC) support
Date: Wed, 5 Jun 2013 19:22:25 +0100	[thread overview]
Message-ID: <20130605182225.GB2650@e102568-lin.cambridge.arm.com> (raw)
In-Reply-To: <1370455713.3496.22.camel@linaro1.home>

On Wed, Jun 05, 2013 at 07:08:33PM +0100, Jon Medhurst (Tixy) wrote:
> On Wed, 2013-06-05 at 12:46 +0100, Lorenzo Pieralisi wrote:
> [...]
> > +static const struct of_device_id vexpress_spc_ids[] __initconst = {
> > +	{ .compatible = "arm,vexpress-spc,v2p-ca15_a7" },
> > +	{ .compatible = "arm,vexpress-spc" },
> > +	{},
> > +};
> > +
> > +static int __init vexpress_spc_init(void)
> > +{
> > +	int ret;
> > +	struct device_node *node = of_find_matching_node(NULL,
> > +							 vexpress_spc_ids);
> 
> To allow for devices without an SPC we should check for !node here and
> bail out, otherwise we get an ugly message from the WARN_ON further
> down. I see this on RTSM, and multiplatform kernels would suffer this as
> well.
> 
> Even if the ugly warning wasn't there, it still seems cleaner to me to
> have a proper check for an absent spc node.

Absolutely, I will apply both fixes, thanks a lot for the review.

Lorenzo


WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 2/2] drivers: mfd: vexpress: add Serial Power Controller (SPC) support
Date: Wed, 5 Jun 2013 19:22:25 +0100	[thread overview]
Message-ID: <20130605182225.GB2650@e102568-lin.cambridge.arm.com> (raw)
In-Reply-To: <1370455713.3496.22.camel@linaro1.home>

On Wed, Jun 05, 2013 at 07:08:33PM +0100, Jon Medhurst (Tixy) wrote:
> On Wed, 2013-06-05 at 12:46 +0100, Lorenzo Pieralisi wrote:
> [...]
> > +static const struct of_device_id vexpress_spc_ids[] __initconst = {
> > +	{ .compatible = "arm,vexpress-spc,v2p-ca15_a7" },
> > +	{ .compatible = "arm,vexpress-spc" },
> > +	{},
> > +};
> > +
> > +static int __init vexpress_spc_init(void)
> > +{
> > +	int ret;
> > +	struct device_node *node = of_find_matching_node(NULL,
> > +							 vexpress_spc_ids);
> 
> To allow for devices without an SPC we should check for !node here and
> bail out, otherwise we get an ugly message from the WARN_ON further
> down. I see this on RTSM, and multiplatform kernels would suffer this as
> well.
> 
> Even if the ugly warning wasn't there, it still seems cleaner to me to
> have a proper check for an absent spc node.

Absolutely, I will apply both fixes, thanks a lot for the review.

Lorenzo

  reply	other threads:[~2013-06-05 18:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 11:46 [RFC PATCH v2 0/2] drivers: mfd: Versatile Express SPC support Lorenzo Pieralisi
2013-06-05 11:46 ` Lorenzo Pieralisi
2013-06-05 11:46 ` Lorenzo Pieralisi
2013-06-05 11:46 ` [RFC PATCH v2 1/2] drivers: mfd: refactor the vexpress config bridge API Lorenzo Pieralisi
2013-06-05 11:46   ` Lorenzo Pieralisi
2013-06-05 13:52   ` Nicolas Pitre
2013-06-05 13:52     ` Nicolas Pitre
2013-06-05 11:46 ` [RFC PATCH v2 2/2] drivers: mfd: vexpress: add Serial Power Controller (SPC) support Lorenzo Pieralisi
2013-06-05 11:46   ` Lorenzo Pieralisi
2013-06-05 14:07   ` Nicolas Pitre
2013-06-05 14:07     ` Nicolas Pitre
2013-06-05 16:32   ` Jon Medhurst (Tixy)
2013-06-05 16:32     ` Jon Medhurst (Tixy)
2013-06-05 18:08   ` Jon Medhurst (Tixy)
2013-06-05 18:08     ` Jon Medhurst (Tixy)
2013-06-05 18:22     ` Lorenzo Pieralisi [this message]
2013-06-05 18:22       ` Lorenzo Pieralisi
2013-06-05 18:22       ` Lorenzo Pieralisi
2013-06-05 14:15 ` [RFC PATCH v2 0/2] drivers: mfd: Versatile Express SPC support Nicolas Pitre
2013-06-05 14:15   ` Nicolas Pitre

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=20130605182225.GB2650@e102568-lin.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=Achin.Gupta@arm.com \
    --cc=Pawel.Moll@arm.com \
    --cc=Sudeep.KarkadaNagesha@arm.com \
    --cc=amit.kucheria@linaro.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=sameo@linux.intel.com \
    --cc=tixy@linaro.org \
    /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.