From: Mark Lord <lkml@rtr.ca>
To: Takashi Iwai <tiwai@suse.de>
Cc: "linux-os (Dick Johnson)" <linux-os@analogic.com>,
Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add cast to __iomem pointer in scsi drivers
Date: Tue, 14 Feb 2006 15:46:22 -0500 [thread overview]
Message-ID: <43F2419E.9060308@rtr.ca> (raw)
In-Reply-To: <s5hu0b1ad2o.wl%tiwai@suse.de>
Takashi Iwai wrote:
> At Tue, 14 Feb 2006 15:35:29 -0500,
> linux-os (Dick Johnson) wrote:
>>
>> On Tue, 14 Feb 2006, Takashi Iwai wrote:
>>
>>> Add the missing cast to __iomem pointer in some scsi drivers.
..
>>> -#define WROUTDOOR(adapter,value) writel(value, (adapter)->base + 0x2C)
...
>>> +#define WROUTDOOR(adapter,value) writel(value, (void __iomem *)((adapter)->base + 0x2C))
..
>> With all these casts, doesn't it point out that something is wrong
>> with writel(), writew(), readl(), and readw() ??? The cast's to
>> volatile types should be within the macros, not scattered
>> throughout everyone's driver code!
>
> The patch is just for fixing compile warnings.
>
> readl(), writel() and co are inline functions, and they should be cast
> explicitly on the caller side.
I think Linus's intent when he added the __iomem "feature", was that code
should change the underlying data declarations to match. So rather than
casting things left and right, and defeating compiler diagnostics by doing so,
perhaps the actual data type for "base" et al. should get changed to match.
Cheers
next prev parent reply other threads:[~2006-02-14 20:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-14 20:13 [PATCH] Add cast to __iomem pointer in scsi drivers Takashi Iwai
2006-02-14 20:35 ` linux-os (Dick Johnson)
2006-02-14 20:40 ` Takashi Iwai
2006-02-14 20:46 ` Mark Lord [this message]
2006-02-14 20:59 ` Takashi Iwai
2006-02-14 21:03 ` Russell King
2006-02-14 21:05 ` Al Viro
2006-02-14 21:14 ` Takashi Iwai
2006-02-14 21:17 ` Al Viro
2006-02-14 20:40 ` Al Viro
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=43F2419E.9060308@rtr.ca \
--to=lkml@rtr.ca \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.com \
--cc=tiwai@suse.de \
/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