diff options
author | Jens Axboe <axboe@suse.de> | 2005-06-20 08:10:25 -0400 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2005-06-20 08:10:25 -0400 |
commit | f63eb21b4f32028755b6b9d47e5eb13c18ba0cae (patch) | |
tree | e4baa980681027709bf278684b9db4dda3ebc2d6 /drivers/block/scsi_ioctl.c | |
parent | e1f546e185e9d8cb9303d74d1cd5bc704f265384 (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/scsi_ioctl.c')
-rw-r--r-- | drivers/block/scsi_ioctl.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c index b35cb75c7528..7717b76f7f20 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, | |||
216 | struct gendisk *bd_disk, struct sg_io_hdr *hdr) | 216 | struct gendisk *bd_disk, struct sg_io_hdr *hdr) |
217 | { | 217 | { |
218 | unsigned long start_time; | 218 | unsigned long start_time; |
219 | int reading, writing, ret = 0; | 219 | int writing = 0, ret = 0; |
220 | struct request *rq; | 220 | struct request *rq; |
221 | struct bio *bio; | 221 | struct bio *bio; |
222 | char sense[SCSI_SENSE_BUFFERSIZE]; | 222 | char sense[SCSI_SENSE_BUFFERSIZE]; |
@@ -234,19 +234,15 @@ static int sg_io(struct file *file, request_queue_t *q, | |||
234 | if (hdr->dxfer_len > (q->max_sectors << 9)) | 234 | if (hdr->dxfer_len > (q->max_sectors << 9)) |
235 | return -EIO; | 235 | return -EIO; |
236 | 236 | ||
237 | reading = writing = 0; | ||
238 | if (hdr->dxfer_len) | 237 | if (hdr->dxfer_len) |
239 | switch (hdr->dxfer_direction) { | 238 | switch (hdr->dxfer_direction) { |
240 | default: | 239 | default: |
241 | return -EINVAL; | 240 | return -EINVAL; |
242 | case SG_DXFER_TO_FROM_DEV: | 241 | case SG_DXFER_TO_FROM_DEV: |
243 | reading = 1; | ||
244 | /* fall through */ | ||
245 | case SG_DXFER_TO_DEV: | 242 | case SG_DXFER_TO_DEV: |
246 | writing = 1; | 243 | writing = 1; |
247 | break; | 244 | break; |
248 | case SG_DXFER_FROM_DEV: | 245 | case SG_DXFER_FROM_DEV: |
249 | reading = 1; | ||
250 | break; | 246 | break; |
251 | } | 247 | } |
252 | 248 | ||