Skip to content

Commit

Permalink
IB/srpt: replace strict_strtoul() with kstrtoul()
Browse files Browse the repository at this point in the history
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Jingoo Han authored and Nicholas Bellinger committed Feb 12, 2014
1 parent 3dca147 commit 9d8abf4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/infiniband/ulp/srpt/ib_srpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3666,9 +3666,9 @@ static ssize_t srpt_tpg_attrib_store_srp_max_rdma_size(
unsigned long val;
int ret;

ret = strict_strtoul(page, 0, &val);
ret = kstrtoul(page, 0, &val);
if (ret < 0) {
pr_err("strict_strtoul() failed with ret: %d\n", ret);
pr_err("kstrtoul() failed with ret: %d\n", ret);
return -EINVAL;
}
if (val > MAX_SRPT_RDMA_SIZE) {
Expand Down Expand Up @@ -3706,9 +3706,9 @@ static ssize_t srpt_tpg_attrib_store_srp_max_rsp_size(
unsigned long val;
int ret;

ret = strict_strtoul(page, 0, &val);
ret = kstrtoul(page, 0, &val);
if (ret < 0) {
pr_err("strict_strtoul() failed with ret: %d\n", ret);
pr_err("kstrtoul() failed with ret: %d\n", ret);
return -EINVAL;
}
if (val > MAX_SRPT_RSP_SIZE) {
Expand Down Expand Up @@ -3746,9 +3746,9 @@ static ssize_t srpt_tpg_attrib_store_srp_sq_size(
unsigned long val;
int ret;

ret = strict_strtoul(page, 0, &val);
ret = kstrtoul(page, 0, &val);
if (ret < 0) {
pr_err("strict_strtoul() failed with ret: %d\n", ret);
pr_err("kstrtoul() failed with ret: %d\n", ret);
return -EINVAL;
}
if (val > MAX_SRPT_SRQ_SIZE) {
Expand Down Expand Up @@ -3793,7 +3793,7 @@ static ssize_t srpt_tpg_store_enable(
unsigned long tmp;
int ret;

ret = strict_strtoul(page, 0, &tmp);
ret = kstrtoul(page, 0, &tmp);
if (ret < 0) {
printk(KERN_ERR "Unable to extract srpt_tpg_store_enable\n");
return -EINVAL;
Expand Down

0 comments on commit 9d8abf4

Please sign in to comment.