nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] device-dax: change error code from postive to negative in range_parse
@ 2020-10-26 11:04 Zhang Qilong
  2020-11-13 18:07 ` Joao Martins
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Qilong @ 2020-10-26 11:04 UTC (permalink / raw)
  To: dan.j.williams, vishal.l.verma, dave.jiang, linux-nvdimm

call trace:
	-> mapping_store()
		-> range_parse()
		......
		rc = -ENXIO;

According to context, the error return value of
range_parse should be negative.

Signed-off-by: Zhang Qilong <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 27513d311242..e15a1a7c2853 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -1047,7 +1047,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.17.1
_______________________________________________
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] 2+ messages in thread

* Re: [PATCH -next] device-dax: change error code from postive to negative in range_parse
  2020-10-26 11:04 [PATCH -next] device-dax: change error code from postive to negative in range_parse Zhang Qilong
@ 2020-11-13 18:07 ` Joao Martins
  0 siblings, 0 replies; 2+ messages in thread
From: Joao Martins @ 2020-11-13 18:07 UTC (permalink / raw)
  To: Zhang Qilong; +Cc: linux-nvdimm

On 10/26/20 11:04 AM, Zhang Qilong wrote:
> call trace:
> 	-> mapping_store()
> 		-> range_parse()
> 		......
> 		rc = -ENXIO;
> 
> According to context, the error return value of
> range_parse should be negative.
> 
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>

Reviewed-by: Joao Martins <joao.m.martins@oracle.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 27513d311242..e15a1a7c2853 100644
> --- a/drivers/dax/bus.c
> +++ b/drivers/dax/bus.c
> @@ -1047,7 +1047,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] 2+ messages in thread

end of thread, other threads:[~2020-11-13 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 11:04 [PATCH -next] device-dax: change error code from postive to negative in range_parse Zhang Qilong
2020-11-13 18:07 ` Joao Martins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).