All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikita Kiryanov <nikita@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] omap_hsmmc: Check wp and cd GPIO for valid GPIO first
Date: Thu, 21 Mar 2013 10:07:48 +0200	[thread overview]
Message-ID: <514ABFD4.3080809@compulab.co.il> (raw)
In-Reply-To: <1363805196-11408-1-git-send-email-trini@ti.com>

Hi Tom,
a few style comments:

On 03/20/2013 08:46 PM, Tom Rini wrote:
> When we cannot check write protect or card change via GPIO (and have
> been passed -1 in omap_mmc_init), only even try the gpio_is_valid is
> true.

That last part needs rephrasing: "only try if gpio_is_valid() is true".

> This prevents invalid GPIO messages from being seen on the
> console when doing MMC operations
>
> Signed-off-by: Tom Rini <trini@ti.com>
>

[...]

> +	if (gpio_is_valid(cd_gpio))
> +		return gpio_get_value(cd_gpio);
> +	else
> +		return -1;

Also, the "else" word is not necessary in both checks.

Aside from that,
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>

-- 
Regards,
Nikita.

  parent reply	other threads:[~2013-03-21  8:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 18:46 [U-Boot] [PATCH v2 1/2] omap_hsmmc: Check wp and cd GPIO for valid GPIO first Tom Rini
2013-03-20 18:46 ` [U-Boot] [PATCH v2 2/2] omap_hsmmc: Use -EINVAL not -1 for errors Tom Rini
2013-03-21  8:07 ` Nikita Kiryanov [this message]
2013-03-21  9:38   ` [U-Boot] [PATCH v2 1/2] omap_hsmmc: Check wp and cd GPIO for valid GPIO first Nikita Kiryanov

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=514ABFD4.3080809@compulab.co.il \
    --to=nikita@compulab.co.il \
    --cc=u-boot@lists.denx.de \
    /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.