linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ACPI: NFIT: Fix judgment of rc is '-ENXIO'
@ 2020-10-27 13:49 Zhang Qilong
  2020-10-27 13:59 ` Pankaj Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zhang Qilong @ 2020-10-27 13:49 UTC (permalink / raw)
  To: dan.j.williams, vishal.l.verma, dave.jiang, ira.weiny, rjw, lenb
  Cc: linux-nvdimm, linux-acpi

Initial value of rc is '-ENXIO', and we should
use the initial value to check it.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 drivers/acpi/nfit/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 756227837b3b..3a3c209ed3d3 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -1564,7 +1564,7 @@ static ssize_t format1_show(struct device *dev,
 					le16_to_cpu(nfit_dcr->dcr->code));
 			break;
 		}
-		if (rc != ENXIO)
+		if (rc != -ENXIO)
 			break;
 	}
 	mutex_unlock(&acpi_desc->init_mutex);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] ACPI: NFIT: Fix judgment of rc is '-ENXIO'
  2020-10-27 13:49 [PATCH -next] ACPI: NFIT: Fix judgment of rc is '-ENXIO' Zhang Qilong
@ 2020-10-27 13:59 ` Pankaj Gupta
  2020-10-27 17:07 ` Verma, Vishal L
  2020-10-27 18:36 ` Rafael J. Wysocki
  2 siblings, 0 replies; 4+ messages in thread
From: Pankaj Gupta @ 2020-10-27 13:59 UTC (permalink / raw)
  To: Zhang Qilong
  Cc: Dan Williams, Vishal Verma, Dave Jiang, Ira Weiny,
	Rafael J. Wysocki, Len Brown, linux-nvdimm, linux-acpi

> Initial value of rc is '-ENXIO', and we should
> use the initial value to check it.
>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
>  drivers/acpi/nfit/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 756227837b3b..3a3c209ed3d3 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -1564,7 +1564,7 @@ static ssize_t format1_show(struct device *dev,
>                                         le16_to_cpu(nfit_dcr->dcr->code));
>                         break;
>                 }
> -               if (rc != ENXIO)
> +               if (rc != -ENXIO)
>                         break;
>         }
>         mutex_unlock(&acpi_desc->init_mutex);

Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] ACPI: NFIT: Fix judgment of rc is '-ENXIO'
  2020-10-27 13:49 [PATCH -next] ACPI: NFIT: Fix judgment of rc is '-ENXIO' Zhang Qilong
  2020-10-27 13:59 ` Pankaj Gupta
@ 2020-10-27 17:07 ` Verma, Vishal L
  2020-10-27 18:36 ` Rafael J. Wysocki
  2 siblings, 0 replies; 4+ messages in thread
From: Verma, Vishal L @ 2020-10-27 17:07 UTC (permalink / raw)
  To: zhangqilong3, Williams, Dan J, Jiang, Dave, lenb, Weiny, Ira, rjw
  Cc: linux-nvdimm, linux-acpi

On Tue, 2020-10-27 at 21:49 +0800, Zhang Qilong wrote:
> Initial value of rc is '-ENXIO', and we should
> use the initial value to check it.
> 
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
>  drivers/acpi/nfit/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks good,
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>

> 
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 756227837b3b..3a3c209ed3d3 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -1564,7 +1564,7 @@ static ssize_t format1_show(struct device *dev,
>  					le16_to_cpu(nfit_dcr->dcr->code));
>  			break;
>  		}
> -		if (rc != ENXIO)
> +		if (rc != -ENXIO)
>  			break;
>  	}
>  	mutex_unlock(&acpi_desc->init_mutex);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] ACPI: NFIT: Fix judgment of rc is '-ENXIO'
  2020-10-27 13:49 [PATCH -next] ACPI: NFIT: Fix judgment of rc is '-ENXIO' Zhang Qilong
  2020-10-27 13:59 ` Pankaj Gupta
  2020-10-27 17:07 ` Verma, Vishal L
@ 2020-10-27 18:36 ` Rafael J. Wysocki
  2 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2020-10-27 18:36 UTC (permalink / raw)
  To: Zhang Qilong
  Cc: Dan Williams, Vishal Verma, Dave Jiang, Ira Weiny,
	Rafael J. Wysocki, Len Brown, linux-nvdimm,
	ACPI Devel Maling List

On Tue, Oct 27, 2020 at 2:38 PM Zhang Qilong <zhangqilong3@huawei.com> wrote:
>
> Initial value of rc is '-ENXIO', and we should
> use the initial value to check it.
>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
>  drivers/acpi/nfit/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 756227837b3b..3a3c209ed3d3 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -1564,7 +1564,7 @@ static ssize_t format1_show(struct device *dev,
>                                         le16_to_cpu(nfit_dcr->dcr->code));
>                         break;
>                 }
> -               if (rc != ENXIO)
> +               if (rc != -ENXIO)
>                         break;
>         }
>         mutex_unlock(&acpi_desc->init_mutex);
> --

Applied as 5.10-rc material with a subject edit, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-27 18:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 13:49 [PATCH -next] ACPI: NFIT: Fix judgment of rc is '-ENXIO' Zhang Qilong
2020-10-27 13:59 ` Pankaj Gupta
2020-10-27 17:07 ` Verma, Vishal L
2020-10-27 18:36 ` Rafael J. Wysocki

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