aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-01-28 13:55:55 -0500
committerJeff Garzik <jgarzik@redhat.com>2011-03-02 02:36:45 -0500
commitc211962dc12d609effbf00a2c5c6fc38cc1dbc54 (patch)
tree821b4232cc3e26e891c378122d0d03f1372103a3 /drivers/ata
parentb83a4c397952a0c05b5468c0403a32e87bb35fef (diff)
sata_dwc_460ex: fix compilation errors/warnings
Fix the following compilation errors/warnings: drivers/ata/sata_dwc_460ex.c:43:1: warning: "DRV_NAME" redefined In file included from drivers/ata/sata_dwc_460ex.c:38: drivers/ata/libata.h:31:1: warning: this is the location of the previous definition drivers/ata/sata_dwc_460ex.c:44:1: warning: "DRV_VERSION" redefined drivers/ata/libata.h:32:1: warning: this is the location of the previous definition drivers/ata/sata_dwc_460ex.c: In function `sata_dwc_exec_command_by_tag': drivers/ata/sata_dwc_460ex.c:1356: warning: passing argument 1 of `ata_get_cmd_descript' makes integer from pointer without a cast drivers/ata/sata_dwc_460ex.c: In function `sata_dwc_qc_issue': drivers/ata/sata_dwc_460ex.c:1476: warning: `err' is used uninitialized in this function drivers/ata/sata_dwc_460ex.c:1465: note: `err' was declared here drivers/ata/sata_dwc_460ex.c: In function `sata_dwc_qc_issue': drivers/ata/sata_dwc_460ex.c:1493: warning: passing argument 1 of `ata_get_cmd_descript' makes integer from pointer without a cast drivers/ata/sata_dwc_460ex.c: In function `sata_dwc_qc_prep': drivers/ata/sata_dwc_460ex.c:1537: error: `tag' undeclared (first use in this function) drivers/ata/sata_dwc_460ex.c:1537: error: (Each undeclared identifier is reported only once drivers/ata/sata_dwc_460ex.c:1537: error: for each function it appears in.) NB: error only happens if DEBUG_NCQ macro is defined... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_dwc_460ex.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index d5d01254c210..9d78f9b78f41 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -40,8 +40,11 @@
40#include <scsi/scsi_host.h> 40#include <scsi/scsi_host.h>
41#include <scsi/scsi_cmnd.h> 41#include <scsi/scsi_cmnd.h>
42 42
43/* These two are defined in "libata.h" */
44#undef DRV_NAME
45#undef DRV_VERSION
43#define DRV_NAME "sata-dwc" 46#define DRV_NAME "sata-dwc"
44#define DRV_VERSION "1.0" 47#define DRV_VERSION "1.1"
45 48
46/* SATA DMA driver Globals */ 49/* SATA DMA driver Globals */
47#define DMA_NUM_CHANS 1 50#define DMA_NUM_CHANS 1
@@ -1354,7 +1357,7 @@ static void sata_dwc_exec_command_by_tag(struct ata_port *ap,
1354 struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap); 1357 struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
1355 1358
1356 dev_dbg(ap->dev, "%s cmd(0x%02x): %s tag=%d\n", __func__, tf->command, 1359 dev_dbg(ap->dev, "%s cmd(0x%02x): %s tag=%d\n", __func__, tf->command,
1357 ata_get_cmd_descript(tf), tag); 1360 ata_get_cmd_descript(tf->command), tag);
1358 1361
1359 spin_lock_irqsave(&ap->host->lock, flags); 1362 spin_lock_irqsave(&ap->host->lock, flags);
1360 hsdevp->cmd_issued[tag] = cmd_issued; 1363 hsdevp->cmd_issued[tag] = cmd_issued;
@@ -1462,7 +1465,6 @@ static void sata_dwc_qc_prep_by_tag(struct ata_queued_cmd *qc, u8 tag)
1462 int dma_chan; 1465 int dma_chan;
1463 struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap); 1466 struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap);
1464 struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap); 1467 struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
1465 int err;
1466 1468
1467 dev_dbg(ap->dev, "%s: port=%d dma dir=%s n_elem=%d\n", 1469 dev_dbg(ap->dev, "%s: port=%d dma dir=%s n_elem=%d\n",
1468 __func__, ap->port_no, ata_get_cmd_descript(qc->dma_dir), 1470 __func__, ap->port_no, ata_get_cmd_descript(qc->dma_dir),
@@ -1474,7 +1476,7 @@ static void sata_dwc_qc_prep_by_tag(struct ata_queued_cmd *qc, u8 tag)
1474 dmadr), qc->dma_dir); 1476 dmadr), qc->dma_dir);
1475 if (dma_chan < 0) { 1477 if (dma_chan < 0) {
1476 dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns err %d\n", 1478 dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns err %d\n",
1477 __func__, err); 1479 __func__, dma_chan);
1478 return; 1480 return;
1479 } 1481 }
1480 hsdevp->dma_chan[tag] = dma_chan; 1482 hsdevp->dma_chan[tag] = dma_chan;
@@ -1491,7 +1493,7 @@ static unsigned int sata_dwc_qc_issue(struct ata_queued_cmd *qc)
1491 dev_info(ap->dev, "%s ap id=%d cmd(0x%02x)=%s qc tag=%d " 1493 dev_info(ap->dev, "%s ap id=%d cmd(0x%02x)=%s qc tag=%d "
1492 "prot=%s ap active_tag=0x%08x ap sactive=0x%08x\n", 1494 "prot=%s ap active_tag=0x%08x ap sactive=0x%08x\n",
1493 __func__, ap->print_id, qc->tf.command, 1495 __func__, ap->print_id, qc->tf.command,
1494 ata_get_cmd_descript(&qc->tf), 1496 ata_get_cmd_descript(qc->tf.command),
1495 qc->tag, ata_get_cmd_descript(qc->tf.protocol), 1497 qc->tag, ata_get_cmd_descript(qc->tf.protocol),
1496 ap->link.active_tag, ap->link.sactive); 1498 ap->link.active_tag, ap->link.sactive);
1497#endif 1499#endif
@@ -1533,7 +1535,7 @@ static void sata_dwc_qc_prep(struct ata_queued_cmd *qc)
1533#ifdef DEBUG_NCQ 1535#ifdef DEBUG_NCQ
1534 if (qc->tag > 0) 1536 if (qc->tag > 0)
1535 dev_info(qc->ap->dev, "%s: qc->tag=%d ap->active_tag=0x%08x\n", 1537 dev_info(qc->ap->dev, "%s: qc->tag=%d ap->active_tag=0x%08x\n",
1536 __func__, tag, qc->ap->link.active_tag); 1538 __func__, qc->tag, qc->ap->link.active_tag);
1537 1539
1538 return ; 1540 return ;
1539#endif 1541#endif