* [2.6 patch] drivers/block/sx8.c: remove unused code
@ 2005-05-02 1:46 Adrian Bunk
2005-05-28 3:53 ` Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2005-05-02 1:46 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jeff Garzik, linux-kernel
Is it planned to ever #define IF_64BIT_DMA_IS_POSSIBLE ?
If not, the patch below removes this currently completely unused code.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 10 Apr 2005
drivers/block/sx8.c | 30 ++++++------------------------
1 files changed, 6 insertions(+), 24 deletions(-)
--- linux-2.6.12-rc2-mm2-full/drivers/block/sx8.c.old 2005-04-09 21:51:31.000000000 +0200
+++ linux-2.6.12-rc2-mm2-full/drivers/block/sx8.c 2005-04-09 21:52:46.000000000 +0200
@@ -176,7 +176,6 @@ enum {
FL_NON_RAID = FW_VER_NON_RAID,
FL_4PORT = FW_VER_4PORT,
FL_FW_VER_MASK = (FW_VER_NON_RAID | FW_VER_4PORT),
- FL_DAC = (1 << 16),
FL_DYN_MAJOR = (1 << 17),
};
@@ -1565,7 +1564,6 @@ static int carm_init_one (struct pci_dev
{
static unsigned int printed_version;
struct carm_host *host;
- unsigned int pci_dac;
int rc;
request_queue_t *q;
unsigned int i;
@@ -1581,28 +1579,12 @@ static int carm_init_one (struct pci_dev
if (rc)
goto err_out;
-#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
- rc = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
- if (!rc) {
- rc = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
- if (rc) {
- printk(KERN_ERR DRV_NAME "(%s): consistent DMA mask failure\n",
- pci_name(pdev));
- goto err_out_regions;
- }
- pci_dac = 1;
- } else {
-#endif
- rc = pci_set_dma_mask(pdev, 0xffffffffULL);
- if (rc) {
- printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n",
- pci_name(pdev));
- goto err_out_regions;
- }
- pci_dac = 0;
-#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
+ rc = pci_set_dma_mask(pdev, 0xffffffffULL);
+ if (rc) {
+ printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n",
+ pci_name(pdev));
+ goto err_out_regions;
}
-#endif
host = kmalloc(sizeof(*host), GFP_KERNEL);
if (!host) {
@@ -1614,7 +1596,7 @@ static int carm_init_one (struct pci_dev
memset(host, 0, sizeof(*host));
host->pdev = pdev;
- host->flags = pci_dac ? FL_DAC : 0;
+ host->flags = 0;
spin_lock_init(&host->lock);
INIT_WORK(&host->fsm_task, carm_fsm_task, host);
init_MUTEX_LOCKED(&host->probe_sem);
^ permalink raw reply [flat|nested] 3+ messages in thread* [2.6 patch] drivers/block/sx8.c: remove unused code
@ 2005-04-09 22:59 Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2005-04-09 22:59 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel
Is it planned to ever #define IF_64BIT_DMA_IS_POSSIBLE ?
If not, the patch below removes this currently completely unused code.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/block/sx8.c | 30 ++++++------------------------
1 files changed, 6 insertions(+), 24 deletions(-)
--- linux-2.6.12-rc2-mm2-full/drivers/block/sx8.c.old 2005-04-09 21:51:31.000000000 +0200
+++ linux-2.6.12-rc2-mm2-full/drivers/block/sx8.c 2005-04-09 21:52:46.000000000 +0200
@@ -176,7 +176,6 @@ enum {
FL_NON_RAID = FW_VER_NON_RAID,
FL_4PORT = FW_VER_4PORT,
FL_FW_VER_MASK = (FW_VER_NON_RAID | FW_VER_4PORT),
- FL_DAC = (1 << 16),
FL_DYN_MAJOR = (1 << 17),
};
@@ -1565,7 +1564,6 @@ static int carm_init_one (struct pci_dev
{
static unsigned int printed_version;
struct carm_host *host;
- unsigned int pci_dac;
int rc;
request_queue_t *q;
unsigned int i;
@@ -1581,28 +1579,12 @@ static int carm_init_one (struct pci_dev
if (rc)
goto err_out;
-#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
- rc = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
- if (!rc) {
- rc = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
- if (rc) {
- printk(KERN_ERR DRV_NAME "(%s): consistent DMA mask failure\n",
- pci_name(pdev));
- goto err_out_regions;
- }
- pci_dac = 1;
- } else {
-#endif
- rc = pci_set_dma_mask(pdev, 0xffffffffULL);
- if (rc) {
- printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n",
- pci_name(pdev));
- goto err_out_regions;
- }
- pci_dac = 0;
-#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
+ rc = pci_set_dma_mask(pdev, 0xffffffffULL);
+ if (rc) {
+ printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n",
+ pci_name(pdev));
+ goto err_out_regions;
}
-#endif
host = kmalloc(sizeof(*host), GFP_KERNEL);
if (!host) {
@@ -1614,7 +1596,7 @@ static int carm_init_one (struct pci_dev
memset(host, 0, sizeof(*host));
host->pdev = pdev;
- host->flags = pci_dac ? FL_DAC : 0;
+ host->flags = 0;
spin_lock_init(&host->lock);
INIT_WORK(&host->fsm_task, carm_fsm_task, host);
init_MUTEX_LOCKED(&host->probe_sem);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-28 3:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-02 1:46 [2.6 patch] drivers/block/sx8.c: remove unused code Adrian Bunk
2005-05-28 3:53 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2005-04-09 22:59 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox