public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@gmail.com>
To: Felipe Balbi <me@felipebalbi.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] I2C: Fix OMAP I2C status register handling in IRQ processing
Date: Wed, 12 Mar 2008 14:51:47 -0500	[thread overview]
Message-ID: <20080312195146.GA18324@ubuntu-workstation> (raw)
In-Reply-To: <726835a879584696afcb396dfcabdc64@felipebalbi.com>

On Wed, Mar 12, 2008 at 01:14:32PM -0500, Felipe Balbi wrote:
> > -	int count = 0;
> > +	int err, count = 0;
> 
> int err = 0, count = 0; will be better and you avoid that err=0 before
> using err right below.

No, the err = 0 I added is in a while loop.  It needs to be
reinitialized for each iteration.

> > +		if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
> > +					OMAP_I2C_STAT_AL))
> 
> err should already hold them, how about
> if (stat & err)

err will not hold ARDY, so it would need to be

	if (stat & (err | OMAP_I2C_STAT_ARDY))

But I don't see the advantage.  Comparing the assembly, what I
submitted generates one less instruction than the above, so the
difference appears to be trivial.

Cheers,
Seth

  reply	other threads:[~2008-03-12 19:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 17:56 [PATCH] I2C: Fix OMAP I2C status register handling in IRQ processing Seth Forshee
2008-03-12 18:14 ` Felipe Balbi
2008-03-12 19:51   ` Seth Forshee [this message]
2008-03-18  3:38 ` Seth Forshee
2008-03-28 10:51   ` Tony Lindgren

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=20080312195146.GA18324@ubuntu-workstation \
    --to=seth.forshee@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=me@felipebalbi.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