* [PATCH] drivers/scsi/sata_svw.c: fix compiler warnings
@ 2005-04-05 23:40 Nick Wilson
2005-04-05 23:56 ` [KJ] " Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Nick Wilson @ 2005-04-05 23:40 UTC (permalink / raw)
To: kernel-janitors; +Cc: linux-ide, jgarzik
Fixes compiler warnings:
warning: passing arg 2 of `writeb' makes pointer from integer without a cast
warning: passing arg 1 of `readw' makes pointer from integer without a cast
Patch is compile tested. Diffed against 2.6.12-rc2-kj.
Nick
Signed-off-by: Nick Wilson <njw@osdl.org>
---
sata_svw.c | 41 +++++++++++++++++++++++------------------
1 files changed, 23 insertions(+), 18 deletions(-)
--- linux.orig/drivers/scsi/sata_svw.c 2005-04-05 14:21:18.000000000 -0700
+++ linux/drivers/scsi/sata_svw.c 2005-04-05 16:36:57.000000000 -0700
@@ -103,26 +103,31 @@ static void k2_sata_tf_load(struct ata_p
unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
if (tf->ctl != ap->last_ctl) {
- writeb(tf->ctl, ioaddr->ctl_addr);
+ writeb(tf->ctl, (void *)ioaddr->ctl_addr);
ap->last_ctl = tf->ctl;
ata_wait_idle(ap);
}
if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
- writew(tf->feature | (((u16)tf->hob_feature) << 8), ioaddr->feature_addr);
- writew(tf->nsect | (((u16)tf->hob_nsect) << 8), ioaddr->nsect_addr);
- writew(tf->lbal | (((u16)tf->hob_lbal) << 8), ioaddr->lbal_addr);
- writew(tf->lbam | (((u16)tf->hob_lbam) << 8), ioaddr->lbam_addr);
- writew(tf->lbah | (((u16)tf->hob_lbah) << 8), ioaddr->lbah_addr);
+ writew(tf->feature | (((u16)tf->hob_feature) << 8),
+ (void *)ioaddr->feature_addr);
+ writew(tf->nsect | (((u16)tf->hob_nsect) << 8),
+ (void *)ioaddr->nsect_addr);
+ writew(tf->lbal | (((u16)tf->hob_lbal) << 8),
+ (void *)ioaddr->lbal_addr);
+ writew(tf->lbam | (((u16)tf->hob_lbam) << 8),
+ (void *)ioaddr->lbam_addr);
+ writew(tf->lbah | (((u16)tf->hob_lbah) << 8),
+ (void *)ioaddr->lbah_addr);
} else if (is_addr) {
- writew(tf->feature, ioaddr->feature_addr);
- writew(tf->nsect, ioaddr->nsect_addr);
- writew(tf->lbal, ioaddr->lbal_addr);
- writew(tf->lbam, ioaddr->lbam_addr);
- writew(tf->lbah, ioaddr->lbah_addr);
+ writew(tf->feature, (void *)ioaddr->feature_addr);
+ writew(tf->nsect, (void *)ioaddr->nsect_addr);
+ writew(tf->lbal, (void *)ioaddr->lbal_addr);
+ writew(tf->lbam, (void *)ioaddr->lbam_addr);
+ writew(tf->lbah, (void *)ioaddr->lbah_addr);
}
if (tf->flags & ATA_TFLAG_DEVICE)
- writeb(tf->device, ioaddr->device_addr);
+ writeb(tf->device, (void *)ioaddr->device_addr);
ata_wait_idle(ap);
}
@@ -133,14 +138,14 @@ static void k2_sata_tf_read(struct ata_p
struct ata_ioports *ioaddr = &ap->ioaddr;
u16 nsect, lbal, lbam, lbah;
- nsect = tf->nsect = readw(ioaddr->nsect_addr);
- lbal = tf->lbal = readw(ioaddr->lbal_addr);
- lbam = tf->lbam = readw(ioaddr->lbam_addr);
- lbah = tf->lbah = readw(ioaddr->lbah_addr);
- tf->device = readw(ioaddr->device_addr);
+ nsect = tf->nsect = readw((void *)ioaddr->nsect_addr);
+ lbal = tf->lbal = readw((void *)ioaddr->lbal_addr);
+ lbam = tf->lbam = readw((void *)ioaddr->lbam_addr);
+ lbah = tf->lbah = readw((void *)ioaddr->lbah_addr);
+ tf->device = readw((void *)ioaddr->device_addr);
if (tf->flags & ATA_TFLAG_LBA48) {
- tf->hob_feature = readw(ioaddr->error_addr) >> 8;
+ tf->hob_feature = readw((void *)ioaddr->error_addr) >> 8;
tf->hob_nsect = nsect >> 8;
tf->hob_lbal = lbal >> 8;
tf->hob_lbam = lbam >> 8;
_
^ permalink raw reply [flat|nested] 2+ messages in thread* [KJ] Re: [PATCH] drivers/scsi/sata_svw.c: fix compiler warnings
2005-04-05 23:40 [PATCH] drivers/scsi/sata_svw.c: fix compiler warnings Nick Wilson
@ 2005-04-05 23:56 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-04-05 23:56 UTC (permalink / raw)
To: Nick Wilson
Cc: Andrew Morton, Al Viro, Linus Torvalds, linux-ide,
kernel-janitors, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]
Nick Wilson wrote:
> Fixes compiler warnings:
> warning: passing arg 2 of `writeb' makes pointer from integer without a cast
> warning: passing arg 1 of `readw' makes pointer from integer without a cast
(added to CC list, just to update people on the status of these
warnings... I know they're annoying)
Thanks, but like I told someone else just yesterday, I'm not interested
in patches which simply shift the warnings around.
You need something _far_ more substantial, like what I have attached,
which updates libata to use the iomap infrastructure.
The warnings are there to let me (and others) know where the changes
need to be made. Applying a patch like yours will almost guarantee that
I will miss a spot that needs to be converted.
Attachments:
patch.1: 97% of the iomap conversion.
patch.2: add kernel infrastructure to map, and store, a bunch of PCI
BARs. For many IDE controllers, one must map 5-6 PCI BARs, but for
others, everything is aggregated into a single MMIO PCI BAR.
The remaining task is to marry the two attached patches, and the work is
complete.
Jeff
[-- Attachment #2: patch.1.bz2 --]
[-- Type: application/x-bzip2, Size: 9040 bytes --]
[-- Attachment #3: patch.2.bz2 --]
[-- Type: application/x-bzip2, Size: 5827 bytes --]
[-- Attachment #4: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-05 23:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-05 23:40 [PATCH] drivers/scsi/sata_svw.c: fix compiler warnings Nick Wilson
2005-04-05 23:56 ` [KJ] " Jeff Garzik
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).