Thread (4 messages) 4 messages, 3 authors, 2021-08-30

Re: [PATCH 1/1] virtio-blk: add num_io_queues module parameter

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-08-30 16:49:28
Also in: linux-block, virtualization

On Mon, Aug 30, 2021 at 03:00:23PM +0300, Max Gurtovoy wrote:
+static int virtblk_queue_count_set(const char *val,
+		const struct kernel_param *kp)
+{
+	unsigned int n;
+	int ret;
+
+	ret = kstrtouint(val, 10, &n);
+	if (ret != 0 || n > nr_cpu_ids)
+		return -EINVAL;
+	return param_set_uint(val, kp);
+}

Thi can use param_set_uint_minmax.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help