From: Ashutosh Naik <ashutosh_naik@adaptec.com>
To: jeremy@sgi.com, benh@kernel.crashing.org, jgarzik@pobox.com,
Andrew Morton <akpm@osdl.org>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] sata: Fixes several warnings in sata_vsc.c and sata_svw.c
Date: Mon, 24 Oct 2005 16:03:33 +0530 [thread overview]
Message-ID: <1130150013.16820.66.camel@kir9060.adaptec.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 161 bytes --]
This patch fixes several types in sata_vsc.c and sata_svw.c and hence
fixes tons of compiler warnings.
Signed-off-by: Ashutosh Naik <ashutosh_naik@adaptec.com>
[-- Attachment #2: sata-patch.txt --]
[-- Type: text/plain, Size: 6700 bytes --]
diff -ruNp linux-sata/drivers/scsi/sata_svw.c linux-2.6.14-rc5/drivers/scsi/sata_svw.c
--- linux-sata/drivers/scsi/sata_svw.c 2005-10-24 15:16:31.000000000 +0530
+++ linux-2.6.14-rc5/drivers/scsi/sata_svw.c 2005-10-24 14:36:51.000000000 +0530
@@ -108,26 +108,26 @@ 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, (unsigned long *)ioaddr->ctl_addr);
+ writeb(tf->ctl, 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), (unsigned long *)ioaddr->feature_addr);
- writew(tf->nsect | (((u16)tf->hob_nsect) << 8), (unsigned long *)ioaddr->nsect_addr);
- writew(tf->lbal | (((u16)tf->hob_lbal) << 8), (unsigned long *)ioaddr->lbal_addr);
- writew(tf->lbam | (((u16)tf->hob_lbam) << 8), (unsigned long *)ioaddr->lbam_addr);
- writew(tf->lbah | (((u16)tf->hob_lbah) << 8), (unsigned long *)ioaddr->lbah_addr);
+ 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);
} else if (is_addr) {
- writew(tf->feature, (unsigned long *)ioaddr->feature_addr);
- writew(tf->nsect, (unsigned long *)ioaddr->nsect_addr);
- writew(tf->lbal, (unsigned long *)ioaddr->lbal_addr);
- writew(tf->lbam, (unsigned long *)ioaddr->lbam_addr);
- writew(tf->lbah, (unsigned long *)ioaddr->lbah_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);
}
if (tf->flags & ATA_TFLAG_DEVICE)
- writeb(tf->device, (unsigned long *)ioaddr->device_addr);
+ writeb(tf->device, ioaddr->device_addr);
ata_wait_idle(ap);
}
@@ -138,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((unsigned long *)ioaddr->nsect_addr);
- lbal = tf->lbal = readw((unsigned long *)ioaddr->lbal_addr);
- lbam = tf->lbam = readw((unsigned long *)ioaddr->lbam_addr);
- lbah = tf->lbah = readw((unsigned long *)ioaddr->lbah_addr);
- tf->device = readw((unsigned long *)ioaddr->device_addr);
+ 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);
if (tf->flags & ATA_TFLAG_LBA48) {
- tf->hob_feature = readw((unsigned long *)ioaddr->error_addr) >> 8;
+ tf->hob_feature = readw(ioaddr->error_addr) >> 8;
tf->hob_nsect = nsect >> 8;
tf->hob_lbal = lbal >> 8;
tf->hob_lbam = lbam >> 8;
diff -ruNp linux-sata/drivers/scsi/sata_vsc.c linux-2.6.14-rc5/drivers/scsi/sata_vsc.c
--- linux-sata/drivers/scsi/sata_vsc.c 2005-10-24 15:16:30.000000000 +0530
+++ linux-2.6.14-rc5/drivers/scsi/sata_vsc.c 2005-10-24 14:36:51.000000000 +0530
@@ -106,12 +106,12 @@ static void vsc_intr_mask_update(struct
mask_addr = (unsigned long) ap->host_set->mmio_base +
VSC_SATA_INT_MASK_OFFSET + ap->port_no;
- mask = readb((unsigned long *)mask_addr);
+ mask = readb(mask_addr);
if (ctl & ATA_NIEN)
mask |= 0x80;
else
mask &= 0x7F;
- writeb(mask, (unsigned long *)mask_addr);
+ writeb(mask, mask_addr);
}
@@ -130,21 +130,21 @@ static void vsc_sata_tf_load(struct ata_
vsc_intr_mask_update(ap, tf->ctl & ATA_NIEN);
}
if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
- writew(tf->feature | (((u16)tf->hob_feature) << 8), (unsigned long *)ioaddr->feature_addr);
- writew(tf->nsect | (((u16)tf->hob_nsect) << 8), (unsigned long *)ioaddr->nsect_addr);
- writew(tf->lbal | (((u16)tf->hob_lbal) << 8), (unsigned long *)ioaddr->lbal_addr);
- writew(tf->lbam | (((u16)tf->hob_lbam) << 8), (unsigned long *)ioaddr->lbam_addr);
- writew(tf->lbah | (((u16)tf->hob_lbah) << 8), (unsigned long *)ioaddr->lbah_addr);
+ 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);
} else if (is_addr) {
- writew(tf->feature, (unsigned long *)ioaddr->feature_addr);
- writew(tf->nsect, (unsigned long *)ioaddr->nsect_addr);
- writew(tf->lbal, (unsigned long *)ioaddr->lbal_addr);
- writew(tf->lbam, (unsigned long *)ioaddr->lbam_addr);
- writew(tf->lbah, (unsigned long *)ioaddr->lbah_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);
}
if (tf->flags & ATA_TFLAG_DEVICE)
- writeb(tf->device, (unsigned long *)ioaddr->device_addr);
+ writeb(tf->device, ioaddr->device_addr);
ata_wait_idle(ap);
}
@@ -155,14 +155,14 @@ static void vsc_sata_tf_read(struct ata_
struct ata_ioports *ioaddr = &ap->ioaddr;
u16 nsect, lbal, lbam, lbah;
- nsect = tf->nsect = readw((unsigned long *)ioaddr->nsect_addr);
- lbal = tf->lbal = readw((unsigned long *)ioaddr->lbal_addr);
- lbam = tf->lbam = readw((unsigned long *)ioaddr->lbam_addr);
- lbah = tf->lbah = readw((unsigned long *)ioaddr->lbah_addr);
- tf->device = readw((unsigned long *)ioaddr->device_addr);
+ 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);
if (tf->flags & ATA_TFLAG_LBA48) {
- tf->hob_feature = readb((unsigned long *)ioaddr->error_addr);
+ tf->hob_feature = readb(ioaddr->error_addr);
tf->hob_nsect = nsect >> 8;
tf->hob_lbal = lbal >> 8;
tf->hob_lbam = lbam >> 8;
@@ -272,8 +272,8 @@ static void __devinit vsc_sata_setup_por
port->ctl_addr = base + VSC_SATA_TF_CTL_OFFSET;
port->bmdma_addr = base + VSC_SATA_DMA_CMD_OFFSET;
port->scr_addr = base + VSC_SATA_SCR_STATUS_OFFSET;
- writel(0, (unsigned long *)base + VSC_SATA_UP_DESCRIPTOR_OFFSET);
- writel(0, (unsigned long *)base + VSC_SATA_UP_DATA_BUFFER_OFFSET);
+ writel(0, base + VSC_SATA_UP_DESCRIPTOR_OFFSET);
+ writel(0, base + VSC_SATA_UP_DATA_BUFFER_OFFSET);
}
next reply other threads:[~2005-10-24 10:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-24 10:33 Ashutosh Naik [this message]
2005-10-24 15:43 ` 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=1130150013.16820.66.camel@kir9060.adaptec.com \
--to=ashutosh_naik@adaptec.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=jeremy@sgi.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®