mirror of https://gitee.com/openkylin/linux.git
block/rnbd-clt: Remove some arguments from rnbd_client_setup_device
Remove them since both sess and idx can be dereferenced from dev. And sess is not used in the function. Signed-off-by: Guoqing Jiang <guoqing.jiang@gmx.com> Reviewed-by: Danil Kipnis <danil.kipnis@cloud.ionos.com> Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com> Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Link: https://lore.kernel.org/r/20210419073722.15351-5-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
02ee80f5fe
commit
8b7f05114b
|
@ -1354,10 +1354,9 @@ static void rnbd_clt_setup_gen_disk(struct rnbd_clt_dev *dev, int idx)
|
|||
blk_queue_flag_set(QUEUE_FLAG_NONROT, dev->queue);
|
||||
}
|
||||
|
||||
static int rnbd_client_setup_device(struct rnbd_clt_session *sess,
|
||||
struct rnbd_clt_dev *dev, int idx)
|
||||
static int rnbd_client_setup_device(struct rnbd_clt_dev *dev)
|
||||
{
|
||||
int err;
|
||||
int err, idx = dev->clt_device_id;
|
||||
|
||||
dev->size = dev->nsectors * dev->logical_block_size;
|
||||
|
||||
|
@ -1535,7 +1534,7 @@ struct rnbd_clt_dev *rnbd_clt_map_device(const char *sessname,
|
|||
mutex_lock(&dev->lock);
|
||||
pr_debug("Opened remote device: session=%s, path='%s'\n",
|
||||
sess->sessname, pathname);
|
||||
ret = rnbd_client_setup_device(sess, dev, dev->clt_device_id);
|
||||
ret = rnbd_client_setup_device(dev);
|
||||
if (ret) {
|
||||
rnbd_clt_err(dev,
|
||||
"map_device: Failed to configure device, err: %d\n",
|
||||
|
|
Loading…
Reference in New Issue