From: Eugene Surovegin <ebs@ebshome.net>
To: Adrian Cox <adrian@humboldt.co.uk>
Cc: Embedded Linux PPC list <linuxppc-embedded@lists.linuxppc.org>,
kumar.gala@freescale.com, mcclintock@freescale.com
Subject: Re: [PATCH][RFC]Updated MPC I2C driver
Date: Thu, 1 Jul 2004 11:59:51 -0700 [thread overview]
Message-ID: <20040701185951.GA15981@gate.ebshome.net> (raw)
In-Reply-To: <1088705955.28598.168.camel@localhost>
On Thu, Jul 01, 2004 at 07:19:15PM +0100, Adrian Cox wrote:
[snip]
> +static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
> +{
> + DECLARE_WAITQUEUE(wait, current);
> + unsigned long orig_jiffies = jiffies;
> + u32 x;
> + int result = 0;
> +
> + if (i2c->ocpdef->irq == OCP_IRQ_NA) {
> + while(! (readl(i2c->base + MPC_I2C_SR) & CSR_MIF)) {
> + schedule();
> + if (orig_jiffies + timeout < jiffies) {
This doesn't look right. Please, use time_after()/time_before() here.
--
Eugene
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-07-01 18:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-01 18:19 [PATCH][RFC]Updated MPC I2C driver Adrian Cox
2004-07-01 14:59 ` Matthew McClintock
2004-07-01 21:25 ` Adrian Cox
2004-07-01 22:32 ` Sylvain Munaut
2004-07-02 9:05 ` Adrian Cox
2004-07-02 11:01 ` Sylvain Munaut
2004-07-02 13:44 ` Adrian Cox
2004-07-02 15:11 ` Sylvain Munaut
2004-07-01 18:59 ` Eugene Surovegin [this message]
2004-07-01 19:20 ` Sylvain Munaut
2004-07-01 15:48 ` Matthew McClintock
2004-07-01 21:07 ` Sylvain Munaut
2004-07-01 20:54 ` Adrian Cox
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=20040701185951.GA15981@gate.ebshome.net \
--to=ebs@ebshome.net \
--cc=adrian@humboldt.co.uk \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=mcclintock@freescale.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;
as well as URLs for NNTP newsgroup(s).