All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joao Martins <joao.m.martins@oracle.com>
To: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org
Subject: Re: [PATCH] dax: fix default return code of range_parse()
Date: Wed, 10 Feb 2021 18:18:35 +0000	[thread overview]
Message-ID: <b685493f-98f5-9717-f88a-308e96440dcd@oracle.com> (raw)
In-Reply-To: <20210126021331.1059933-1-ruansy.fnst@cn.fujitsu.com>

On 1/26/21 2:13 AM, Shiyang Ruan wrote:
> The return value of range_parse() indicates the size when it is
> positive.  The error code should be negative.
> 
> Signed-off-by: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com>

Reviewed-by: Joao Martins <joao.m.martins@oracle.com>

Although, FWIW, there was another patch exactly like this a couple
months ago, albeit it didn't get pulled for some reason:

https://lore.kernel.org/linux-nvdimm/20201026110425.136629-1-zhangqilong3@huawei.com/

> ---
>  drivers/dax/bus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
> index 737b207c9e30..3003558c1a8b 100644
> --- a/drivers/dax/bus.c
> +++ b/drivers/dax/bus.c
> @@ -1038,7 +1038,7 @@ static ssize_t range_parse(const char *opt, size_t len, struct range *range)
>  {
>  	unsigned long long addr = 0;
>  	char *start, *end, *str;
> -	ssize_t rc = EINVAL;
> +	ssize_t rc = -EINVAL;
>  
>  	str = kstrdup(opt, GFP_KERNEL);
>  	if (!str)
> 
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: Joao Martins <joao.m.martins@oracle.com>
To: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org,
	dan.j.williams@intel.com, vishal.l.verma@intel.com,
	dave.jiang@intel.com
Subject: Re: [PATCH] dax: fix default return code of range_parse()
Date: Wed, 10 Feb 2021 18:18:35 +0000	[thread overview]
Message-ID: <b685493f-98f5-9717-f88a-308e96440dcd@oracle.com> (raw)
In-Reply-To: <20210126021331.1059933-1-ruansy.fnst@cn.fujitsu.com>

On 1/26/21 2:13 AM, Shiyang Ruan wrote:
> The return value of range_parse() indicates the size when it is
> positive.  The error code should be negative.
> 
> Signed-off-by: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com>

Reviewed-by: Joao Martins <joao.m.martins@oracle.com>

Although, FWIW, there was another patch exactly like this a couple
months ago, albeit it didn't get pulled for some reason:

https://lore.kernel.org/linux-nvdimm/20201026110425.136629-1-zhangqilong3@huawei.com/

> ---
>  drivers/dax/bus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
> index 737b207c9e30..3003558c1a8b 100644
> --- a/drivers/dax/bus.c
> +++ b/drivers/dax/bus.c
> @@ -1038,7 +1038,7 @@ static ssize_t range_parse(const char *opt, size_t len, struct range *range)
>  {
>  	unsigned long long addr = 0;
>  	char *start, *end, *str;
> -	ssize_t rc = EINVAL;
> +	ssize_t rc = -EINVAL;
>  
>  	str = kstrdup(opt, GFP_KERNEL);
>  	if (!str)
> 

  parent reply	other threads:[~2021-02-10 18:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26  2:13 [PATCH] dax: fix default return code of range_parse() Shiyang Ruan
2021-01-26  2:13 ` Shiyang Ruan
2021-02-08  5:49 ` Ruan Shiyang
2021-02-08  5:49   ` Ruan Shiyang
2021-02-10 18:18 ` Joao Martins [this message]
2021-02-10 18:18   ` Joao Martins
2021-02-16 22:38   ` Dan Williams
2021-02-16 22:38     ` Dan Williams

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=b685493f-98f5-9717-f88a-308e96440dcd@oracle.com \
    --to=joao.m.martins@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=ruansy.fnst@cn.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.