All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: devicetree-discuss@ozlabs.org
Cc: Linux Netdev List <netdev@vger.kernel.org>,
	linuxppc-dev <Linuxppc-dev@ozlabs.org>
Subject: Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver
Date: Sat, 23 May 2009 13:15:56 +0200	[thread overview]
Message-ID: <200905231315.57016.arnd@arndb.de> (raw)
In-Reply-To: <4A16BAAE.3070401@grandegger.com>

On Friday 22 May 2009, Wolfgang Grandegger wrote:
> This patch adds a generic driver for SJA1000 chips on the OpenFirmware
> platform bus found on embedded PowerPC systems. 

Nice driver!

> +static u8 sja1000_ofp_read_reg(const struct net_device *dev, int reg)
> +{
> +	return in_8((void __iomem *)(dev->base_addr + reg));
> +}
> +
> +static void sja1000_ofp_write_reg(const struct net_device *dev, int reg, u8 val)
> +{
> +	out_8((void __iomem *)(dev->base_addr + reg), val);
> +}

Minor nitpicking: dev->base_addr should be defined as an __iomem pointer
so you can avoid the cast here and in the ioremap/iounmap path.

	Arnd <><

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: devicetree-discuss@ozlabs.org
Cc: Wolfgang Grandegger <wg@grandegger.com>,
	Linux Netdev List <netdev@vger.kernel.org>,
	linuxppc-dev <Linuxppc-dev@ozlabs.org>
Subject: Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver
Date: Sat, 23 May 2009 13:15:56 +0200	[thread overview]
Message-ID: <200905231315.57016.arnd@arndb.de> (raw)
In-Reply-To: <4A16BAAE.3070401@grandegger.com>

On Friday 22 May 2009, Wolfgang Grandegger wrote:
> This patch adds a generic driver for SJA1000 chips on the OpenFirmware
> platform bus found on embedded PowerPC systems. 

Nice driver!

> +static u8 sja1000_ofp_read_reg(const struct net_device *dev, int reg)
> +{
> +	return in_8((void __iomem *)(dev->base_addr + reg));
> +}
> +
> +static void sja1000_ofp_write_reg(const struct net_device *dev, int reg, u8 val)
> +{
> +	out_8((void __iomem *)(dev->base_addr + reg), val);
> +}

Minor nitpicking: dev->base_addr should be defined as an __iomem pointer
so you can avoid the cast here and in the ioremap/iounmap path.

	Arnd <><

  parent reply	other threads:[~2009-05-23 11:15 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 14:46 [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver Wolfgang Grandegger
2009-05-22 15:08 ` Grant Likely
2009-05-22 15:08   ` Grant Likely
2009-05-23  6:29   ` Wolfgang Grandegger
2009-05-23  6:29     ` Wolfgang Grandegger
2009-05-23 16:44     ` Wolfgang Grandegger
2009-05-25  6:53       ` Grant Likely
2009-05-25  6:53         ` Grant Likely
2009-05-25  8:15         ` Wolfgang Grandegger
2009-05-23 11:15 ` Arnd Bergmann [this message]
2009-05-23 11:15   ` Arnd Bergmann
2009-05-23 16:51   ` Wolfgang Grandegger
2009-05-23 16:51     ` Wolfgang Grandegger
2009-05-24 22:27     ` Arnd Bergmann
2009-05-25  6:58       ` Wolfgang Grandegger
2009-05-25  6:58         ` Wolfgang Grandegger
2009-05-26  9:10         ` Arnd Bergmann
2009-05-26  9:10           ` Arnd Bergmann
2009-05-26  9:25           ` David Miller
2009-05-26  9:25             ` David Miller
2009-05-26  9:42             ` Arnd Bergmann
2009-05-26 11:20               ` Sascha Hauer
2009-05-26 11:20                 ` Sascha Hauer
2009-05-26 14:23             ` Wolfgang Grandegger
2009-05-30 17:59               ` Wolfgang Grandegger
2009-05-26  9:40           ` Benjamin Herrenschmidt
2009-05-26  9:40             ` Benjamin Herrenschmidt

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=200905231315.57016.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=devicetree-discuss@ozlabs.org \
    --cc=netdev@vger.kernel.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.