All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Cc: Bryan Wu <bryan.wu-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [patch 2.6.24 3/6] spi_bfin: wait for tx to complete on some cs_chg paths
Date: Thu, 31 Jan 2008 13:26:31 -0800	[thread overview]
Message-ID: <20080131132631.91075a19.akpm@linux-foundation.org> (raw)
In-Reply-To: <200801311219.11238.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>

On Thu, 31 Jan 2008 12:19:11 -0800
David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> wrote:

> +		while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
> +			cpu_relax();

I'd suggest that this commonly-occurring code sequence be implemented in a
standalone function.  That'll probably produce less code and you can also
add a timeout+printk+BUG (or whatever) to that function, rather than just
mysteriously locking up if something goes wrong.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-01-31 21:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31 20:19 [patch 2.6.24 3/6] spi_bfin: wait for tx to complete on some cs_chg paths David Brownell
     [not found] ` <200801311219.11238.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-01-31 21:26   ` Andrew Morton [this message]
     [not found]     ` <20080131132631.91075a19.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-01-31 21:53       ` David Brownell
     [not found]         ` <200801311353.34281.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-02-02  6:20           ` Bryan Wu
2008-02-02  6:59             ` 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=20080131132631.91075a19.akpm@linux-foundation.org \
    --to=akpm-de/tnxtf+jlsfhdxvbkv3wd2fqjk+8+b@public.gmane.org \
    --cc=bryan.wu-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@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.