Linux-ACPI Archive on lore.kernel.org
 help / color / 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	[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, back to index

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

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org
	public-inbox-index linux-acpi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git