On Fri, 2011-11-04 at 21:28 +0300, Dan Carpenter wrote:
> These days we've renamed strict_strtoul() to kstrtoul().  It has a
> couple different error codes it could return.  Smatch complains if
> we return -EINVAL instead of using the return value that kstrtoul()
> gave us.
> 
> Signed-off-by: Dan Carpenter <[email protected]>

Looks fine to me, and will get this series queued up for -rc2.

Thanks Dan!

--nab

> 
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c 
> b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index f27b8da..04ccc04 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -3704,10 +3704,10 @@ 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);
> -             return -EINVAL;
> +             pr_err("kstrtoul() failed with ret: %d\n", ret);
> +             return ret;
>       }
>       if (val > MAX_SRPT_RDMA_SIZE) {
>               pr_err("val: %lu exceeds MAX_SRPT_RDMA_SIZE: %d\n", val,
> @@ -3744,10 +3744,10 @@ 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);
> -             return -EINVAL;
> +             pr_err("kstrtoul() failed with ret: %d\n", ret);
> +             return ret;
>       }
>       if (val > MAX_SRPT_RSP_SIZE) {
>               pr_err("val: %lu exceeds MAX_SRPT_RSP_SIZE: %d\n", val,
> @@ -3784,10 +3784,10 @@ 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);
> -             return -EINVAL;
> +             pr_err("kstrtoul() failed with ret: %d\n", ret);
> +             return ret;
>       }
>       if (val > MAX_SRPT_SRQ_SIZE) {
>               pr_err("val: %lu exceeds MAX_SRPT_SRQ_SIZE: %d\n", val,
> @@ -3831,10 +3831,10 @@ 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;
> +             return ret;
>       }
>  
>       if ((tmp != 0) && (tmp != 1)) {


--
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

Reply via email to