public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: i2c@lm-sensors.org, linux-arm-kernel@lists.arm.linux.org.uk,
	linux-kernel@vger.kernel.org
Subject: Re: [i2c] [PATCH] I2C bus driver for Philips ARM boards
Date: Thu, 22 Jun 2006 11:39:55 -0700	[thread overview]
Message-ID: <20060622183955.GA6372@kroah.com> (raw)
In-Reply-To: <20060622153146.2ae56e33.vitalywool@gmail.com>

On Thu, Jun 22, 2006 at 03:31:46PM +0400, Vitaly Wool wrote:
> +static inline int i2c_pnx_bus_busy(volatile struct i2c_regs *master)
> +{
> +	long timeout;
> +
> +	timeout = TIMEOUT * 10000;
> +	if (timeout > 0 && (master->sts & mstatus_active)) {

Please use the proper ioread() function to read from memory, and don't
rely on a memory mapped structure.  Linux does this in order to work for
all platforms.

A big hint about this, if you have volatile in your driver, it's
wrong...

thanks,

greg k-h

  parent reply	other threads:[~2006-06-22 18:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22 11:31 [PATCH] I2C bus driver for Philips ARM boards Vitaly Wool
2006-06-22 11:45 ` Ben Dooks
2006-06-22 12:08   ` Vitaly Wool
2006-06-22 18:39 ` Greg KH [this message]
     [not found]   ` <acd2a5930606221317w6432aefcsf4569fca3b59ebcd@mail.gmail.com>
2006-06-22 20:35     ` [i2c] " Greg KH
2006-06-22 22:26       ` Mark Underwood
2006-06-23  9:38         ` Vitaly Wool
2006-06-23 12:16           ` Mark Underwood

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=20060622183955.GA6372@kroah.com \
    --to=greg@kroah.com \
    --cc=i2c@lm-sensors.org \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vitalywool@gmail.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