* [PATCH 2.6.15-rc2-mm1] scsi: fix compiler-warning for sata_svw.c
@ 2005-11-26 23:35 Richard Knutsson
2005-11-27 0:55 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Richard Knutsson @ 2005-11-26 23:35 UTC (permalink / raw)
To: benh, jgarzik; +Cc: linux-ide
From: Richard Knutsson <ricknu-0@student.ltu.se>
Fix compiler-warning "... makes pointer from integer without a cast".
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
sata_svw.c | 65 ++++++++++++++++++++++++++++++++-----------------------------
1 files changed, 35 insertions(+), 30 deletions(-)
--- a/drivers/scsi/sata_svw.c 2005-11-26 21:41:35.000000000 +0100
+++ b/drivers/scsi/sata_svw.c 2005-11-26 23:46:32.000000000 +0100
@@ -110,26 +110,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);
}
@@ -140,26 +145,26 @@ static void k2_sata_tf_read(struct ata_p
struct ata_ioports *ioaddr = &ap->ioaddr;
u16 nsect, lbal, lbam, lbah, feature;
- tf->command = k2_stat_check_status(ap);
- tf->device = readw(ioaddr->device_addr);
- feature = readw(ioaddr->error_addr);
- nsect = readw(ioaddr->nsect_addr);
- lbal = readw(ioaddr->lbal_addr);
- lbam = readw(ioaddr->lbam_addr);
- lbah = readw(ioaddr->lbah_addr);
-
- tf->feature = feature;
- tf->nsect = nsect;
- tf->lbal = lbal;
- tf->lbam = lbam;
- tf->lbah = lbah;
+ tf->command = k2_stat_check_status(ap);
+ tf->device = readw((void *) ioaddr->device_addr);
+ feature = readw((void *) ioaddr->error_addr);
+ nsect = readw((void *) ioaddr->nsect_addr);
+ lbal = readw((void *) ioaddr->lbal_addr);
+ lbam = readw((void *) ioaddr->lbam_addr);
+ lbah = readw((void *) ioaddr->lbah_addr);
+
+ tf->feature = feature;
+ tf->nsect = nsect;
+ tf->lbal = lbal;
+ tf->lbam = lbam;
+ tf->lbah = lbah;
if (tf->flags & ATA_TFLAG_LBA48) {
- tf->hob_feature = feature >> 8;
- tf->hob_nsect = nsect >> 8;
- tf->hob_lbal = lbal >> 8;
- tf->hob_lbam = lbam >> 8;
- tf->hob_lbah = lbah >> 8;
+ tf->hob_feature = feature >> 8;
+ tf->hob_nsect = nsect >> 8;
+ tf->hob_lbal = lbal >> 8;
+ tf->hob_lbam = lbam >> 8;
+ tf->hob_lbah = lbah >> 8;
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.15-rc2-mm1] scsi: fix compiler-warning for sata_svw.c
2005-11-26 23:35 [PATCH 2.6.15-rc2-mm1] scsi: fix compiler-warning for sata_svw.c Richard Knutsson
@ 2005-11-27 0:55 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-11-27 0:55 UTC (permalink / raw)
To: Richard Knutsson; +Cc: benh, linux-ide
On Sun, Nov 27, 2005 at 12:35:33AM +0100, Richard Knutsson wrote:
> From: Richard Knutsson <ricknu-0@student.ltu.se>
>
> Fix compiler-warning "... makes pointer from integer without a cast".
>
> Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
NAK, as it has been NAK'd many times before.
Please check the archives and fix the real problem.
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-27 0:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-26 23:35 [PATCH 2.6.15-rc2-mm1] scsi: fix compiler-warning for sata_svw.c Richard Knutsson
2005-11-27 0:55 ` Jeff Garzik
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.