Commit 583d6535 authored by Jens Axboe's avatar Jens Axboe

dasd: remove dead code

Since e443343e we haven't had a request_fn attached to
this driver, hence any code inside an if (q->request_fn) is
unreachable.

Fixes: e443343e ("s390/dasd: blk-mq conversion")
[sth: Keep and fix the dasd_info->chanq_len counter.]
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarJan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: default avatarStefan Haberland <sth@linux.ibm.com>
Tested-by: default avatarMing Lei <ming.lei@redhat.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c6f28826
...@@ -412,6 +412,7 @@ static int dasd_ioctl_information(struct dasd_block *block, ...@@ -412,6 +412,7 @@ static int dasd_ioctl_information(struct dasd_block *block,
struct ccw_dev_id dev_id; struct ccw_dev_id dev_id;
struct dasd_device *base; struct dasd_device *base;
struct ccw_device *cdev; struct ccw_device *cdev;
struct list_head *l;
unsigned long flags; unsigned long flags;
int rc; int rc;
...@@ -462,23 +463,10 @@ static int dasd_ioctl_information(struct dasd_block *block, ...@@ -462,23 +463,10 @@ static int dasd_ioctl_information(struct dasd_block *block,
memcpy(dasd_info->type, base->discipline->name, 4); memcpy(dasd_info->type, base->discipline->name, 4);
if (block->request_queue->request_fn) { spin_lock_irqsave(&block->queue_lock, flags);
struct list_head *l;
#ifdef DASD_EXTENDED_PROFILING
{
struct list_head *l;
spin_lock_irqsave(&block->lock, flags);
list_for_each(l, &block->request_queue->queue_head)
dasd_info->req_queue_len++;
spin_unlock_irqrestore(&block->lock, flags);
}
#endif /* DASD_EXTENDED_PROFILING */
spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags);
list_for_each(l, &base->ccw_queue) list_for_each(l, &base->ccw_queue)
dasd_info->chanq_len++; dasd_info->chanq_len++;
spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), spin_unlock_irqrestore(&block->queue_lock, flags);
flags);
}
rc = 0; rc = 0;
if (copy_to_user(argp, dasd_info, if (copy_to_user(argp, dasd_info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment