From: Christoph Hellwig <hch@infradead.org>
To: Max Gurtovoy <mgurtovoy@nvidia.com>
Cc: axboe@kernel.dk, kvm@vger.kernel.org, mst@redhat.com,
virtualization@lists.linux-foundation.org,
linux-block@vger.kernel.org, stefanha@redhat.com,
oren@nvidia.com
Subject: Re: [PATCH 1/1] virtio-blk: add num_io_queues module parameter
Date: Mon, 30 Aug 2021 17:48:29 +0100 [thread overview]
Message-ID: <YS0L3RIiPfb9d5Xx@infradead.org> (raw)
In-Reply-To: <20210830120023.22202-1-mgurtovoy@nvidia.com>
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.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next parent reply other threads:[~2021-08-30 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210830120023.22202-1-mgurtovoy@nvidia.com>
2021-08-30 16:48 ` Christoph Hellwig [this message]
2021-08-30 21:48 ` [PATCH 1/1] virtio-blk: add num_io_queues module parameter Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YS0L3RIiPfb9d5Xx@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=kvm@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=mgurtovoy@nvidia.com \
--cc=mst@redhat.com \
--cc=oren@nvidia.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).