public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] rtc: Add NXP PCF8523 support
Date: Wed, 28 Nov 2012 15:31:58 -0800	[thread overview]
Message-ID: <20121128153158.ba24124e.akpm@linux-foundation.org> (raw)
In-Reply-To: <1354130486-24693-1-git-send-email-thierry.reding@avionic-design.de>

On Wed, 28 Nov 2012 20:21:26 +0100
Thierry Reding <thierry.reding@avionic-design.de> wrote:

> +	err = i2c_transfer(client->adapter, &msg, 1);
> +	if (err < 0) {
> +		/*
> +		 * If the time cannot be set, restart the RTC anyway. Note
> +		 * that errors are ignored if the RTC cannot be started so
> +		 * that we have a chance to propagate the original error.
> +		 */
> +		pcf8523_start_rtc(client);
> +		return err;
> +	}
> +
> +	return pcf8523_start_rtc(client);

hm, well, that is of course equivalent to

	err = i2c_transfer(client->adapter, &msg, 1);
	pcf8523_start_rtc(client);
	return err;

but I suppose the code as proposed is clear, extensible, and not our
worst-ever sin ;)


  reply	other threads:[~2012-11-28 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 19:21 [PATCH v2] rtc: Add NXP PCF8523 support Thierry Reding
2012-11-28 23:31 ` Andrew Morton [this message]
2012-11-29  6:41   ` Thierry Reding

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=20121128153158.ba24124e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=thierry.reding@avionic-design.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox