All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: sbabic-ynQEQJNshbs@public.gmane.org
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] The of_register_spi_devices() was	not called after registering the spi master.
Date: Mon, 29 Sep 2008 08:12:30 -0600	[thread overview]
Message-ID: <20080929141230.GA9448@secretlab.ca> (raw)
In-Reply-To: <1222417480-3144-2-git-send-email-sbabic-ynQEQJNshbs@public.gmane.org>

On Fri, Sep 26, 2008 at 10:24:40AM +0200, sbabic-ynQEQJNshbs@public.gmane.org wrote:
> From: Stefano Babic <sbabic-ynQEQJNshbs@public.gmane.org>
> 
> Signed-off-by: Stefano Babic <sbabic-ynQEQJNshbs@public.gmane.org>

One comment below.

> ---
>  drivers/spi/mpc52xx_psc_spi.c |   16 +++++++++++++---
>  1 files changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
> index 25eda71..5d233e7 100644
> --- a/drivers/spi/mpc52xx_psc_spi.c
> +++ b/drivers/spi/mpc52xx_psc_spi.c
> @@ -545,8 +550,13 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
>  		id = *psc_nump + 1;
>  	}
>  
> -	return mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64,
> -					irq_of_parse_and_map(op->node, 0), id);
> +	if ((ret = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64,
> +					irq_of_parse_and_map(op->node, 0), id)))
> +		return ret;

Preferred form is:

	ret = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64,
					irq_of_parse_and_map(op->node, 0), id);
	if (ret)
		return ret;

Burying the assignment inside the if() makes the code harder to read and
understand.

Otherwise, this looks right to me.

Thanks,
g.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

  parent reply	other threads:[~2008-09-29 14:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-26  8:24 [PATCH] The of_register_spi_devices() was not called after registering the spi master sbabic-ynQEQJNshbs
     [not found] ` <1222417480-3144-1-git-send-email-sbabic-ynQEQJNshbs@public.gmane.org>
2008-09-26  8:24   ` sbabic-ynQEQJNshbs
     [not found]     ` <1222417480-3144-2-git-send-email-sbabic-ynQEQJNshbs@public.gmane.org>
2008-09-29 14:12       ` Grant Likely [this message]
     [not found]         ` <20080929141230.GA9448-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
2008-09-29 15:04           ` Stefano Babic
     [not found]             ` <48E0EE8F.1000200-ynQEQJNshbs@public.gmane.org>
2008-09-29 22:39               ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2008-09-26  8:41 Stefano Babic
2008-09-17 17:06 stefano.babic-jEVQdWr+paajF4gvJNWmbkB+6BGkLq7r
     [not found] ` <1221671160-602-1-git-send-email-stefano.babic-jEVQdWr+paajF4gvJNWmbkB+6BGkLq7r@public.gmane.org>
2008-09-25  4:59   ` David Brownell
     [not found]     ` <200809242159.53970.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-09-25  5:33       ` Grant Likely
     [not found]         ` <20080925053305.GA8254-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
2008-09-25  5:57           ` David Brownell

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=20080929141230.GA9448@secretlab.ca \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=sbabic-ynQEQJNshbs@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.