aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-06-20 14:10:25 +0200
committerJens Axboe <axboe@suse.de>2005-06-20 14:10:25 +0200
commitf63eb21b4f32028755b6b9d47e5eb13c18ba0cae (patch)
treee4baa980681027709bf278684b9db4dda3ebc2d6 /drivers/block
parente1f546e185e9d8cb9303d74d1cd5bc704f265384 (diff)
[PATCH] kill 'reading' variable in sg_io(), it isn't used anymore.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/scsi_ioctl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
index b35cb75c752..7717b76f7f2 100644
--- a/drivers/block/scsi_ioctl.c
+++ b/drivers/block/scsi_ioctl.c
@@ -216,7 +216,7 @@ static int sg_io(struct file *file, request_queue_t *q,
struct gendisk *bd_disk, struct sg_io_hdr *hdr)
{
unsigned long start_time;
- int reading, writing, ret = 0;
+ int writing = 0, ret = 0;
struct request *rq;
struct bio *bio;
char sense[SCSI_SENSE_BUFFERSIZE];
@@ -234,19 +234,15 @@ static int sg_io(struct file *file, request_queue_t *q,
if (hdr->dxfer_len > (q->max_sectors << 9))
return -EIO;
- reading = writing = 0;
if (hdr->dxfer_len)
switch (hdr->dxfer_direction) {
default:
return -EINVAL;
case SG_DXFER_TO_FROM_DEV:
- reading = 1;
- /* fall through */
case SG_DXFER_TO_DEV:
writing = 1;
break;
case SG_DXFER_FROM_DEV:
- reading = 1;
break;
}