As rq_data_dir() only checks a single bit (REQ_WRITE), the result can not be anything but READ or WRITE. Thus last ELSE clause is not needed at all. Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx> --- drivers/scsi/sd.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 463a324835f4..fbb522add124 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -760,12 +760,9 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq) sd_dif_prepare(rq, block, sdp->sector_size) == -EIO) goto out; - } else if (rq_data_dir(rq) == READ) { + } else { /* READ */ SCpnt->cmnd[0] = READ_6; SCpnt->sc_data_direction = DMA_FROM_DEVICE; - } else { - scmd_printk(KERN_ERR, SCpnt, "Unknown command %x\n", rq->cmd_flags); - goto out; } SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt, -- 1.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html