mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manuel Lauss <mano@roarinelk.homelinux.net>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtc: t reaches -1, tested 0
Date: Sun, 8 Feb 2009 19:23:00 +0100	[thread overview]
Message-ID: <20090208192300.51d0a80c@scarran.roarinelk.net> (raw)
In-Reply-To: <498EE7D6.4090100@gmail.com>

Hey Roel,

On Sun, 08 Feb 2009 15:10:30 +0100
Roel Kluin <roel.kluin@gmail.com> wrote:
> With a postfix decrement t will reach -1 rather than 0,
> so the warning nor errot_out occur.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c
> index 8906a68..979ed04 100644
> --- a/drivers/rtc/rtc-au1xxx.c
> +++ b/drivers/rtc/rtc-au1xxx.c
> @@ -81,7 +81,7 @@ static int __devinit au1xtoy_rtc_probe(struct platform_device *pdev)
>  	if (au_readl(SYS_TOYTRIM) != 32767) {
>  		/* wait until hardware gives access to TRIM register */
>  		t = 0x00100000;
> -		while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && t--)
> +		while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && --t)
>  			msleep(1);
>  
>  		if (!t) {

Thank you, obviously correct.

Acked-by: Manuel Lauss <mano@roarinelk.homelinux.net>

  reply	other threads:[~2009-02-08 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-08 14:10 Roel Kluin
2009-02-08 18:23 ` Manuel Lauss [this message]
2009-02-08 18:29 ` Alessandro Zummo

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=20090208192300.51d0a80c@scarran.roarinelk.net \
    --to=mano@roarinelk.homelinux.net \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    --cc=rtc-linux@googlegroups.com \
    /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

all inboxes | Powered by JetHome®