linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Remi Machet <rmachet@slac.stanford.edu>
To: Dale Farnsworth <dale@farnsworth.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] sysdev,mv64x60: initialization of mv64x60 ethernet, serial and I2C
Date: Fri, 18 Apr 2008 17:31:45 -0700	[thread overview]
Message-ID: <1208565105.5789.35.camel@pcds-ts102.slac.stanford.edu> (raw)
In-Reply-To: <20080418205815.GA21162@farnsworth.org>

Hi Dale,

Thanks for the comments, I will re-submit the patch on Monday without
the of_node_put and split in 2.

Remi

On Fri, 2008-04-18 at 13:58 -0700, Dale Farnsworth wrote:
> On Thu, Apr 17, 2008 at 04:35:55PM -0700, Remi Machet wrote:
> > This patch affects only the mv64x60 driver. It fixes 2 problem:
> 
> Hi Remi,
> 
> Thanks for finding and addressing these issues.
> BTW, since you're fixing 2 problems, you might split this into 2 patches.
> 
> > -If one of the devices of the mv64x60 init fails, the remaining 
> > devices are not initialized => I changed the code to display an
> > error and continue the initialization.
> 
> I agree that this is a good idea.  A small comment on details below.
> 
> > -I2C parameters freq_m and freq_n are assigned default in the code
> > but if those properties are not found in the open firmware description 
> > the init returns an error=> the code now uses the default
> > values if the properties are not found.
> 
> Yes.  Sigh, I can't believe I missed this.
> 
> > diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
> > index 047b310..ef0fc99 100644
> > --- a/arch/powerpc/sysdev/mv64x60_dev.c
> > +++ b/arch/powerpc/sysdev/mv64x60_dev.c
> > @@ -433,9 +431,15 @@ static int __init mv64x60_device_setup(void)
> >  	int err;
> >  
> >  	id = 0;
> > -	for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc")
> > -		if ((err = mv64x60_mpsc_device_setup(np, id++)))
> > -			goto error;
> > +	for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc") {
> > +		err = mv64x60_mpsc_device_setup(np, id++);
> > +		if (err) {
> > +			printk(KERN_ERR "Failed to initialize MV64x60 " \
> > +					"serial device %s: error %d.\n",
> > +					np->full_name, err);
> > +			of_node_put(np);
> 
> This of_node_put call (and the others you added) are not needed.
> 
> Thanks,
> -Dale

      reply	other threads:[~2008-04-19  0:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 23:35 [PATCH] sysdev,mv64x60: initialization of mv64x60 ethernet, serial and I2C Remi Machet
2008-04-18 20:58 ` Dale Farnsworth
2008-04-19  0:31   ` Remi Machet [this message]

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=1208565105.5789.35.camel@pcds-ts102.slac.stanford.edu \
    --to=rmachet@slac.stanford.edu \
    --cc=dale@farnsworth.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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 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).