* [PATCH 1/3] ide-tape: remove never executed code
@ 2008-02-09 15:23 Bartlomiej Zolnierkiewicz
2008-02-09 17:54 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-09 15:23 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-ide, Borislav Petkov
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>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-tape.c | 34 ----------------------------------
1 file changed, 34 deletions(-)
Index: b/drivers/ide/ide-tape.c
===================================================================
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -466,9 +466,6 @@ static void ide_tape_put(struct ide_tape
/* 0 = no tape is loaded, so we don't rewind after ejecting */
#define IDETAPE_MEDIUM_PRESENT 9
-/* A define for the READ BUFFER command */
-#define IDETAPE_RETRIEVE_FAULTY_BLOCK 6
-
/* Some defines for the SPACE command */
#define IDETAPE_SPACE_OVER_FILEMARK 1
#define IDETAPE_SPACE_TO_EOD 3
@@ -490,7 +487,6 @@ enum {
REQ_IDETAPE_PC2 = (1 << 1), /* packet command (second stage) */
REQ_IDETAPE_READ = (1 << 2),
REQ_IDETAPE_WRITE = (1 << 3),
- REQ_IDETAPE_READ_BUFFER = (1 << 4),
};
/* Error codes returned in rq->errors to the higher part of the driver. */
@@ -1523,29 +1519,6 @@ static void idetape_create_read_cmd(idet
set_bit(PC_DMA_RECOMMENDED, &pc->flags);
}
-static void idetape_create_read_buffer_cmd(idetape_tape_t *tape,
- idetape_pc_t *pc, struct idetape_bh *bh)
-{
- int size = 32768;
- struct idetape_bh *p = bh;
-
- idetape_init_pc(pc);
- pc->c[0] = READ_BUFFER;
- pc->c[1] = IDETAPE_RETRIEVE_FAULTY_BLOCK;
- pc->c[7] = size >> 8;
- pc->c[8] = size & 0xff;
- pc->callback = &idetape_pc_callback;
- pc->bh = bh;
- atomic_set(&bh->b_count, 0);
- pc->buffer = NULL;
- while (p) {
- atomic_set(&p->b_count, 0);
- p = p->b_reqnext;
- }
- pc->request_transfer = size;
- pc->buffer_size = size;
-}
-
static void idetape_create_write_cmd(idetape_tape_t *tape, idetape_pc_t *pc,
unsigned int length, struct idetape_bh *bh)
{
@@ -1655,13 +1628,6 @@ static ide_startstop_t idetape_do_reques
(struct idetape_bh *)rq->special);
goto out;
}
- if (rq->cmd[0] & REQ_IDETAPE_READ_BUFFER) {
- tape->postpone_cnt = 0;
- pc = idetape_next_pc_storage(drive);
- idetape_create_read_buffer_cmd(tape, pc,
- (struct idetape_bh *)rq->special);
- goto out;
- }
if (rq->cmd[0] & REQ_IDETAPE_PC1) {
pc = (idetape_pc_t *) rq->buffer;
rq->cmd[0] &= ~(REQ_IDETAPE_PC1);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] ide-tape: remove never executed code
2008-02-09 15:23 [PATCH 1/3] ide-tape: remove never executed code Bartlomiej Zolnierkiewicz
@ 2008-02-09 17:54 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2008-02-09 17:54 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide, Borislav Petkov
Bartlomiej Zolnierkiewicz wrote:
> 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>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
MBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-09 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-09 15:23 [PATCH 1/3] ide-tape: remove never executed code Bartlomiej Zolnierkiewicz
2008-02-09 17:54 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox