diff options
author | Chaitanya Kulkarni <kch@nvidia.com> | 2023-03-26 22:37:24 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2023-04-13 08:55:05 +0200 |
commit | 6fe240bc0d97902ecebd811bb22bd85b36d75ee2 (patch) | |
tree | 6d4402b9663bcd0d428c148b3f844668a67cb70b /drivers/nvme/target/tcp.c | |
parent | 44aef3b850757a371adde7e47c5c243d3988aa73 (diff) |
nvmet-tcp: validate idle poll modparam value
The module parameter idle_poll_period_usecs is passed to the function
usecs_to_jiffies() which has following prototype and expect
idle_poll_period_usecs arg type to be unsigned int:-
unsigned long usecs_to_jiffies(const unsigned int u);
Use similar module parameter validation callback as previous patch.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/tcp.c')
-rw-r--r-- | drivers/nvme/target/tcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c index 85ffcc8d0f99..ed98df72c76b 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -61,9 +61,10 @@ MODULE_PARM_DESC(so_priority, "nvmet tcp socket optimize priority: Default 0"); * using advanced interrupt moderation techniques. */ static int idle_poll_period_usecs; -module_param(idle_poll_period_usecs, int, 0644); +device_param_cb(idle_poll_period_usecs, &set_param_ops, + &idle_poll_period_usecs, 0644); MODULE_PARM_DESC(idle_poll_period_usecs, - "nvmet tcp io_work poll till idle time period in usecs"); + "nvmet tcp io_work poll till idle time period in usecs: Default 0"); #define NVMET_TCP_RECV_BUDGET 8 #define NVMET_TCP_SEND_BUDGET 8 |