public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: "Wu, Bryan" <bryan.wu@analog.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	a.zummo@towertech.it, vapier@gentoo.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 5/5] Blackfin: on-chip RTC controller driver
Date: Thu, 1 Mar 2007 18:14:08 +0900	[thread overview]
Message-ID: <20070301091408.GA4324@linux-sh.org> (raw)
In-Reply-To: <1172722546.5264.79.camel@roc-desktop>

On Thu, Mar 01, 2007 at 12:15:46PM +0800, Wu, Bryan wrote:
> +#define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __FUNCTION__, __LINE__, ## args)
> +#define stampit() stamp("here i am")
> +

Are these really necessary for the final driver? It's littered all over
the place, and presumably the driver should be functional enough to not
need this sort of debugging instrumentation.

[snip]

> +static void rtc_bfin_sync_pending(void)
> +{
> +	stampit();
> +	while (!(bfin_read_RTC_ISTAT() & RTC_ISTAT_WRITE_COMPLETE)) {
> +		if (!(bfin_read_RTC_ISTAT() & RTC_ISTAT_WRITE_PENDING))
> +			break;
> +	}
> +	bfin_write_RTC_ISTAT(RTC_ISTAT_WRITE_COMPLETE);
> +}
> +
No timeout? (and superfluous braces)

> +	case RTC_PIE_ON:
> +		stampit();
> +		spin_lock_irq(&rtc->lock);
> +		rtc_bfin_sync_pending();

And it's also called under a spinlock each time.. this is a disaster
waiting to happen.

  reply	other threads:[~2007-03-01  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01  4:15 [PATCH -mm 5/5] Blackfin: on-chip RTC controller driver Wu, Bryan
2007-03-01  9:14 ` Paul Mundt [this message]
2007-03-01 14:09   ` Mike Frysinger

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=20070301091408.GA4324@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=bryan.wu@analog.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vapier@gentoo.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