aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-19 06:42:56 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-23 20:59:42 -0400
commit2dcb407e61458ded17503d6bd12b8c064965368b (patch)
tree6044e032197b84f9943a385b0c9dbb6656c3f97f /drivers/ata/sata_mv.c
parent01e7ae8c13bb06a2ce622ebace33bb7e28ef596c (diff)
[libata] checkpatch-inspired cleanups
Tackle the relatively sane complaints of checkpatch --file. The vast majority is indentation and whitespace changes, the rest are * #include fixes * printk KERN_xxx prefix addition * BSS/initializer cleanups Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r--drivers/ata/sata_mv.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 7f1b13e89cf7..b39648f0914b 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -845,7 +845,7 @@ static int __mv_stop_dma(struct ata_port *ap)
845 pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; 845 pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN;
846 } else { 846 } else {
847 WARN_ON(EDMA_EN & readl(port_mmio + EDMA_CMD_OFS)); 847 WARN_ON(EDMA_EN & readl(port_mmio + EDMA_CMD_OFS));
848 } 848 }
849 849
850 /* now properly wait for the eDMA to stop */ 850 /* now properly wait for the eDMA to stop */
851 for (i = 1000; i > 0; i--) { 851 for (i = 1000; i > 0; i--) {
@@ -883,7 +883,7 @@ static void mv_dump_mem(void __iomem *start, unsigned bytes)
883 for (b = 0; b < bytes; ) { 883 for (b = 0; b < bytes; ) {
884 DPRINTK("%p: ", start + b); 884 DPRINTK("%p: ", start + b);
885 for (w = 0; b < bytes && w < 4; w++) { 885 for (w = 0; b < bytes && w < 4; w++) {
886 printk("%08x ",readl(start + b)); 886 printk("%08x ", readl(start + b));
887 b += sizeof(u32); 887 b += sizeof(u32);
888 } 888 }
889 printk("\n"); 889 printk("\n");
@@ -899,8 +899,8 @@ static void mv_dump_pci_cfg(struct pci_dev *pdev, unsigned bytes)
899 for (b = 0; b < bytes; ) { 899 for (b = 0; b < bytes; ) {
900 DPRINTK("%02x: ", b); 900 DPRINTK("%02x: ", b);
901 for (w = 0; b < bytes && w < 4; w++) { 901 for (w = 0; b < bytes && w < 4; w++) {
902 (void) pci_read_config_dword(pdev,b,&dw); 902 (void) pci_read_config_dword(pdev, b, &dw);
903 printk("%08x ",dw); 903 printk("%08x ", dw);
904 b += sizeof(u32); 904 b += sizeof(u32);
905 } 905 }
906 printk("\n"); 906 printk("\n");
@@ -944,9 +944,9 @@ static void mv_dump_all_regs(void __iomem *mmio_base, int port,
944 } 944 }
945 for (p = start_port; p < start_port + num_ports; p++) { 945 for (p = start_port; p < start_port + num_ports; p++) {
946 port_base = mv_port_base(mmio_base, p); 946 port_base = mv_port_base(mmio_base, p);
947 DPRINTK("EDMA regs (port %i):\n",p); 947 DPRINTK("EDMA regs (port %i):\n", p);
948 mv_dump_mem(port_base, 0x54); 948 mv_dump_mem(port_base, 0x54);
949 DPRINTK("SATA regs (port %i):\n",p); 949 DPRINTK("SATA regs (port %i):\n", p);
950 mv_dump_mem(port_base+0x300, 0x60); 950 mv_dump_mem(port_base+0x300, 0x60);
951 } 951 }
952#endif 952#endif
@@ -1184,7 +1184,7 @@ static void mv_qc_prep(struct ata_queued_cmd *qc)
1184 u16 flags = 0; 1184 u16 flags = 0;
1185 unsigned in_index; 1185 unsigned in_index;
1186 1186
1187 if (qc->tf.protocol != ATA_PROT_DMA) 1187 if (qc->tf.protocol != ATA_PROT_DMA)
1188 return; 1188 return;
1189 1189
1190 /* Fill in command request block 1190 /* Fill in command request block
@@ -1276,7 +1276,7 @@ static void mv_qc_prep_iie(struct ata_queued_cmd *qc)
1276 unsigned in_index; 1276 unsigned in_index;
1277 u32 flags = 0; 1277 u32 flags = 0;
1278 1278
1279 if (qc->tf.protocol != ATA_PROT_DMA) 1279 if (qc->tf.protocol != ATA_PROT_DMA)
1280 return; 1280 return;
1281 1281
1282 /* Fill in Gen IIE command request block 1282 /* Fill in Gen IIE command request block
@@ -1606,7 +1606,7 @@ static void mv_host_intr(struct ata_host *host, u32 relevant, unsigned int hc)
1606 writelfl(~hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS); 1606 writelfl(~hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS);
1607 1607
1608 VPRINTK("ENTER, hc%u relevant=0x%08x HC IRQ cause=0x%08x\n", 1608 VPRINTK("ENTER, hc%u relevant=0x%08x HC IRQ cause=0x%08x\n",
1609 hc,relevant,hc_irq_cause); 1609 hc, relevant, hc_irq_cause);
1610 1610
1611 for (port = port0; port < port0 + MV_PORTS_PER_HC; port++) { 1611 for (port = port0; port < port0 + MV_PORTS_PER_HC; port++) {
1612 struct ata_port *ap = host->ports[port]; 1612 struct ata_port *ap = host->ports[port];
@@ -1983,9 +1983,8 @@ static int mv6_reset_hc(struct mv_host_priv *hpriv, void __iomem *mmio,
1983 for (i = 0; i < 1000; i++) { 1983 for (i = 0; i < 1000; i++) {
1984 udelay(1); 1984 udelay(1);
1985 t = readl(reg); 1985 t = readl(reg);
1986 if (PCI_MASTER_EMPTY & t) { 1986 if (PCI_MASTER_EMPTY & t)
1987 break; 1987 break;
1988 }
1989 } 1988 }
1990 if (!(PCI_MASTER_EMPTY & t)) { 1989 if (!(PCI_MASTER_EMPTY & t)) {
1991 printk(KERN_ERR DRV_NAME ": PCI master won't flush\n"); 1990 printk(KERN_ERR DRV_NAME ": PCI master won't flush\n");
@@ -2668,7 +2667,7 @@ static void mv_print_info(struct ata_host *host)
2668 */ 2667 */
2669static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 2668static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2670{ 2669{
2671 static int printed_version = 0; 2670 static int printed_version;
2672 unsigned int board_idx = (unsigned int)ent->driver_data; 2671 unsigned int board_idx = (unsigned int)ent->driver_data;
2673 const struct ata_port_info *ppi[] = { &mv_port_info[board_idx], NULL }; 2672 const struct ata_port_info *ppi[] = { &mv_port_info[board_idx], NULL };
2674 struct ata_host *host; 2673 struct ata_host *host;