aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-10 18:32:14 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-10 18:32:14 -0500
commit31cb2120270cb43403428de67d8cb5caeb58dfd2 (patch)
tree99eb2d84e7fc5fcf54bb9a35acbb637290526b7f /drivers
parent56efa7b0e437808d367a92f7820b3aba930c230d (diff)
ide-tape: remove never executed code
rq->cmd[0] is never set to REQ_IDETAPE_READ_BUFFER so remove REQ_IDETAPE_READ_BUFFER handling from idetape_create_write_cmd() and the define itself. Then remove no longer used idetape_create_read_buffer_cmd() and IDETAPE_RETRIEVE_FAULTY_BLOCK define. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-tape.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 49dd2e7bae7a..0598ecfd5f37 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -466,9 +466,6 @@ static void ide_tape_put(struct ide_tape_obj *tape)
466/* 0 = no tape is loaded, so we don't rewind after ejecting */ 466/* 0 = no tape is loaded, so we don't rewind after ejecting */
467#define IDETAPE_MEDIUM_PRESENT 9 467#define IDETAPE_MEDIUM_PRESENT 9
468 468
469/* A define for the READ BUFFER command */
470#define IDETAPE_RETRIEVE_FAULTY_BLOCK 6
471
472/* Some defines for the SPACE command */ 469/* Some defines for the SPACE command */
473#define IDETAPE_SPACE_OVER_FILEMARK 1 470#define IDETAPE_SPACE_OVER_FILEMARK 1
474#define IDETAPE_SPACE_TO_EOD 3 471#define IDETAPE_SPACE_TO_EOD 3
@@ -490,7 +487,6 @@ enum {
490 REQ_IDETAPE_PC2 = (1 << 1), /* packet command (second stage) */ 487 REQ_IDETAPE_PC2 = (1 << 1), /* packet command (second stage) */
491 REQ_IDETAPE_READ = (1 << 2), 488 REQ_IDETAPE_READ = (1 << 2),
492 REQ_IDETAPE_WRITE = (1 << 3), 489 REQ_IDETAPE_WRITE = (1 << 3),
493 REQ_IDETAPE_READ_BUFFER = (1 << 4),
494}; 490};
495 491
496/* Error codes returned in rq->errors to the higher part of the driver. */ 492/* Error codes returned in rq->errors to the higher part of the driver. */
@@ -1523,29 +1519,6 @@ static void idetape_create_read_cmd(idetape_tape_t *tape, idetape_pc_t *pc,
1523 set_bit(PC_DMA_RECOMMENDED, &pc->flags); 1519 set_bit(PC_DMA_RECOMMENDED, &pc->flags);
1524} 1520}
1525 1521
1526static void idetape_create_read_buffer_cmd(idetape_tape_t *tape,
1527 idetape_pc_t *pc, struct idetape_bh *bh)
1528{
1529 int size = 32768;
1530 struct idetape_bh *p = bh;
1531
1532 idetape_init_pc(pc);
1533 pc->c[0] = READ_BUFFER;
1534 pc->c[1] = IDETAPE_RETRIEVE_FAULTY_BLOCK;
1535 pc->c[7] = size >> 8;
1536 pc->c[8] = size & 0xff;
1537 pc->callback = &idetape_pc_callback;
1538 pc->bh = bh;
1539 atomic_set(&bh->b_count, 0);
1540 pc->buffer = NULL;
1541 while (p) {
1542 atomic_set(&p->b_count, 0);
1543 p = p->b_reqnext;
1544 }
1545 pc->request_transfer = size;
1546 pc->buffer_size = size;
1547}
1548
1549static void idetape_create_write_cmd(idetape_tape_t *tape, idetape_pc_t *pc, 1522static void idetape_create_write_cmd(idetape_tape_t *tape, idetape_pc_t *pc,
1550 unsigned int length, struct idetape_bh *bh) 1523 unsigned int length, struct idetape_bh *bh)
1551{ 1524{
@@ -1655,13 +1628,6 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
1655 (struct idetape_bh *)rq->special); 1628 (struct idetape_bh *)rq->special);
1656 goto out; 1629 goto out;
1657 } 1630 }
1658 if (rq->cmd[0] & REQ_IDETAPE_READ_BUFFER) {
1659 tape->postpone_cnt = 0;
1660 pc = idetape_next_pc_storage(drive);
1661 idetape_create_read_buffer_cmd(tape, pc,
1662 (struct idetape_bh *)rq->special);
1663 goto out;
1664 }
1665 if (rq->cmd[0] & REQ_IDETAPE_PC1) { 1631 if (rq->cmd[0] & REQ_IDETAPE_PC1) {
1666 pc = (idetape_pc_t *) rq->buffer; 1632 pc = (idetape_pc_t *) rq->buffer;
1667 rq->cmd[0] &= ~(REQ_IDETAPE_PC1); 1633 rq->cmd[0] &= ~(REQ_IDETAPE_PC1);