* [PATCH] dax: fix default return code of range_parse()
@ 2021-01-26 2:13 ` Shiyang Ruan
0 siblings, 0 replies; 8+ messages in thread
From: Shiyang Ruan @ 2021-01-26 2:13 UTC (permalink / raw)
To: linux-nvdimm, dan.j.williams, vishal.l.verma, dave.jiang; +Cc: linux-kernel
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>
---
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)
--
2.30.0
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] dax: fix default return code of range_parse()
@ 2021-01-26 2:13 ` Shiyang Ruan
0 siblings, 0 replies; 8+ messages in thread
From: Shiyang Ruan @ 2021-01-26 2:13 UTC (permalink / raw)
To: linux-nvdimm, dan.j.williams, vishal.l.verma, dave.jiang; +Cc: linux-kernel
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>
---
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)
--
2.30.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] dax: fix default return code of range_parse()
2021-01-26 2:13 ` Shiyang Ruan
@ 2021-02-08 5:49 ` Ruan Shiyang
-1 siblings, 0 replies; 8+ messages in thread
From: Ruan Shiyang @ 2021-02-08 5:49 UTC (permalink / raw)
To: linux-nvdimm, dan.j.williams, vishal.l.verma, dave.jiang; +Cc: linux-kernel
ping
On 2021/1/26 上午10:13, 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>
> ---
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dax: fix default return code of range_parse()
@ 2021-02-08 5:49 ` Ruan Shiyang
0 siblings, 0 replies; 8+ messages in thread
From: Ruan Shiyang @ 2021-02-08 5:49 UTC (permalink / raw)
To: linux-nvdimm, dan.j.williams, vishal.l.verma, dave.jiang; +Cc: linux-kernel
ping
On 2021/1/26 上午10:13, 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>
> ---
> 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)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dax: fix default return code of range_parse()
2021-01-26 2:13 ` Shiyang Ruan
@ 2021-02-10 18:18 ` Joao Martins
-1 siblings, 0 replies; 8+ messages in thread
From: Joao Martins @ 2021-02-10 18:18 UTC (permalink / raw)
To: Shiyang Ruan; +Cc: linux-kernel, linux-nvdimm
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dax: fix default return code of range_parse()
@ 2021-02-10 18:18 ` Joao Martins
0 siblings, 0 replies; 8+ messages in thread
From: Joao Martins @ 2021-02-10 18:18 UTC (permalink / raw)
To: Shiyang Ruan
Cc: linux-kernel, linux-nvdimm, dan.j.williams, vishal.l.verma, dave.jiang
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)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dax: fix default return code of range_parse()
2021-02-10 18:18 ` Joao Martins
@ 2021-02-16 22:38 ` Dan Williams
-1 siblings, 0 replies; 8+ messages in thread
From: Dan Williams @ 2021-02-16 22:38 UTC (permalink / raw)
To: Joao Martins; +Cc: Linux Kernel Mailing List, linux-nvdimm, Zhang Qilong
On Wed, Feb 10, 2021 at 10:19 AM Joao Martins <joao.m.martins@oracle.com> wrote:
>
> 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/
Apologies for missing these... applied now.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dax: fix default return code of range_parse()
@ 2021-02-16 22:38 ` Dan Williams
0 siblings, 0 replies; 8+ messages in thread
From: Dan Williams @ 2021-02-16 22:38 UTC (permalink / raw)
To: Joao Martins
Cc: Shiyang Ruan, Linux Kernel Mailing List, linux-nvdimm,
Vishal L Verma, Dave Jiang, Zhang Qilong
On Wed, Feb 10, 2021 at 10:19 AM Joao Martins <joao.m.martins@oracle.com> wrote:
>
> 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/
Apologies for missing these... applied now.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-02-17 1:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-02-10 18:18 ` Joao Martins
2021-02-16 22:38 ` Dan Williams
2021-02-16 22:38 ` Dan Williams
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.