public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH] sata_svw: Fix __iomem related warnings
Date: Mon, 13 Sep 2004 09:36:28 +0100	[thread overview]
Message-ID: <20040913093628.A24406@infradead.org> (raw)
In-Reply-To: <1095049642.4536.256.camel@gaston>; from benh@kernel.crashing.org on Mon, Sep 13, 2004 at 02:27:22PM +1000

On Mon, Sep 13, 2004 at 02:27:22PM +1000, Benjamin Herrenschmidt wrote:
> This patch adds some (ugly) casts to sata_svw to remove the
> warnings generated by the new iomem stuff.

Umm, maybe it's just me - but shouldn't you fix them properly?

> 
> -		writeb(tf->ctl, ioaddr->ctl_addr);
> +		writeb(tf->ctl, (void __iomem *)ioaddr->ctl_addr);

e.g. ioaddr->ctl_addr should get a __iomem attribute

> +		writew(tf->feature | (((u16)tf->hob_feature) << 8),
> +		       (void __iomem *)ioaddr->feature_addr);
> +		writew(tf->nsect | (((u16)tf->hob_nsect) << 8),
> +		       (void __iomem *)ioaddr->nsect_addr);
> +		writew(tf->lbal | (((u16)tf->hob_lbal) << 8),
> +		       (void __iomem *)ioaddr->lbal_addr);
> +		writew(tf->lbam | (((u16)tf->hob_lbam) << 8),
> +		       (void __iomem *)ioaddr->lbam_addr);
> +		writew(tf->lbah | (((u16)tf->hob_lbah) << 8),
> +		       (void __iomem *)ioaddr->lbah_addr);

dito for all the others.

just hacking around the annotations with casts seems ather pointless.

  reply	other threads:[~2004-09-13  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13  4:27 [PATCH] sata_svw: Fix __iomem related warnings Benjamin Herrenschmidt
2004-09-13  8:36 ` Christoph Hellwig [this message]
2004-09-13 13:19   ` Jeff Garzik

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=20040913093628.A24406@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox