IB/srpt: replace strict_strtoul() with kstrtoul()
Subsystems (2)
PATCH 1/1 IB/srpt: replace strict_strtoul() with kstrtoul()
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used.
Signed-off-by Jingoo Han <[email protected]>
--- drivers/infiniband/ulp/srpt/ib_srpt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/infiniband/ulp/srpt/ib_srpt.c +7 -7
@@ -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 ) {
@@ -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 ) {
@@ -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 ) {
@@ -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 ;
Signature · 7 lines
1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 000501cf2219$1031f530$3095df90$%[email protected]
Nicholas A. Bellinger
AppliedQuoted 6 lines · Jingoo Han
The usage of
strict_strtoul()is not preferred, becausestrict_strtoul()is obsolete. Thus,kstrtoul()should be used.Signed-off-by Jingoo Han <[email protected]>---
Applied to target-pending/queue.
Thanks!
--nab
Quoted 44 lines
drivers/infiniband/ulp/srpt/ib_srpt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/infiniband/ulp/srpt/ib_srpt.c +6
-6@@ -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 ) {@@ -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 ) {@@ -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 ) {
drivers/infiniband/ulp/srpt/ib_srpt.c static ssize_t srpt_tpg_store_enable( · line 3799
Quoted 8 lines
drivers/infiniband/ulp/srpt/ib_srpt.c +1
-1@@ -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 ;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html