Commit 9e386f49 authored by Yoav Cohen's avatar Yoav Cohen Committed by Jens Axboe
Browse files

ublk: make ublk_ctrl_stop_dev return void



This function always returns 0, so there is no need to return a value.

Signed-off-by: default avatarYoav Cohen <yoav@nvidia.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 78796b6b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3459,10 +3459,9 @@ static inline void ublk_ctrl_cmd_dump(struct io_uring_cmd *cmd)
			header->data[0], header->addr, header->len);
}

static int ublk_ctrl_stop_dev(struct ublk_device *ub)
static void ublk_ctrl_stop_dev(struct ublk_device *ub)
{
	ublk_stop_dev(ub);
	return 0;
}

static int ublk_ctrl_get_dev_info(struct ublk_device *ub,
@@ -3935,7 +3934,8 @@ static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd,
		ret = ublk_ctrl_start_dev(ub, header);
		break;
	case UBLK_CMD_STOP_DEV:
		ret = ublk_ctrl_stop_dev(ub);
		ublk_ctrl_stop_dev(ub);
		ret = 0;
		break;
	case UBLK_CMD_GET_DEV_INFO:
	case UBLK_CMD_GET_DEV_INFO2: