* [PATCH] acpi/apei: Fix in-correct return value
@ 2016-10-18 16:07 Punit Agrawal
2016-10-20 19:51 ` Baicar, Tyler
2016-10-21 21:28 ` Rafael J. Wysocki
0 siblings, 2 replies; 6+ messages in thread
From: Punit Agrawal @ 2016-10-18 16:07 UTC (permalink / raw)
To: linux-acpi, rjw; +Cc: linux-kernel, tbaicar, bp, Punit Agrawal, Len Brown
Although ghes_proc tests for error while reading the error status, it
always return success (0). Fix this by propagating the return value.
Fixes: d334a49113a4a33 ("ACPI, APEI, Generic Hardware Error Source memory error support")
Signed-of-by: Punit Agrawal <punit.agrawa.@arm.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
---
drivers/acpi/apei/ghes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index f0a029e..0d099a2 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -662,7 +662,7 @@ static int ghes_proc(struct ghes *ghes)
ghes_do_proc(ghes, ghes->estatus);
out:
ghes_clear_estatus(ghes);
- return 0;
+ return rc;
}
static void ghes_add_timer(struct ghes *ghes)
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] acpi/apei: Fix in-correct return value
2016-10-18 16:07 [PATCH] acpi/apei: Fix in-correct return value Punit Agrawal
@ 2016-10-20 19:51 ` Baicar, Tyler
2016-10-21 14:58 ` Punit Agrawal
2016-10-21 21:28 ` Rafael J. Wysocki
1 sibling, 1 reply; 6+ messages in thread
From: Baicar, Tyler @ 2016-10-20 19:51 UTC (permalink / raw)
To: Punit Agrawal, linux-acpi, rjw; +Cc: linux-kernel, bp, Len Brown
On 10/18/2016 10:07 AM, Punit Agrawal wrote:
> Although ghes_proc tests for error while reading the error status, it
> always return success (0). Fix this by propagating the return value.
>
> Fixes: d334a49113a4a33 ("ACPI, APEI, Generic Hardware Error Source memory error support")
> Signed-of-by: Punit Agrawal <punit.agrawa.@arm.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
Thanks,
Tyler
> ---
> drivers/acpi/apei/ghes.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index f0a029e..0d099a2 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -662,7 +662,7 @@ static int ghes_proc(struct ghes *ghes)
> ghes_do_proc(ghes, ghes->estatus);
> out:
> ghes_clear_estatus(ghes);
> - return 0;
> + return rc;
> }
>
> static void ghes_add_timer(struct ghes *ghes)
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] acpi/apei: Fix in-correct return value
2016-10-20 19:51 ` Baicar, Tyler
@ 2016-10-21 14:58 ` Punit Agrawal
0 siblings, 0 replies; 6+ messages in thread
From: Punit Agrawal @ 2016-10-21 14:58 UTC (permalink / raw)
To: Baicar, Tyler; +Cc: linux-acpi, rjw, linux-kernel, bp, Len Brown
"Baicar, Tyler" <tbaicar@codeaurora.org> writes:
> On 10/18/2016 10:07 AM, Punit Agrawal wrote:
>> Although ghes_proc tests for error while reading the error status, it
>> always return success (0). Fix this by propagating the return value.
>>
>> Fixes: d334a49113a4a33 ("ACPI, APEI, Generic Hardware Error Source memory error support")
>> Signed-of-by: Punit Agrawal <punit.agrawa.@arm.com>
>> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
>> Cc: Len Brown <lenb@kernel.org>
> Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
Thanks for taking the patch for a spin.
Hopefully Rafael can pick the patch as a fixes for the next rc.
>
> Thanks,
> Tyler
>> ---
>> drivers/acpi/apei/ghes.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
>> index f0a029e..0d099a2 100644
>> --- a/drivers/acpi/apei/ghes.c
>> +++ b/drivers/acpi/apei/ghes.c
>> @@ -662,7 +662,7 @@ static int ghes_proc(struct ghes *ghes)
>> ghes_do_proc(ghes, ghes->estatus);
>> out:
>> ghes_clear_estatus(ghes);
>> - return 0;
>> + return rc;
>> }
>> static void ghes_add_timer(struct ghes *ghes)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] acpi/apei: Fix in-correct return value
2016-10-18 16:07 [PATCH] acpi/apei: Fix in-correct return value Punit Agrawal
2016-10-20 19:51 ` Baicar, Tyler
@ 2016-10-21 21:28 ` Rafael J. Wysocki
2016-10-22 16:37 ` Borislav Petkov
1 sibling, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2016-10-21 21:28 UTC (permalink / raw)
To: Punit Agrawal, bp; +Cc: linux-acpi, linux-kernel, tbaicar, Len Brown
On Tuesday, October 18, 2016 05:07:19 PM Punit Agrawal wrote:
> Although ghes_proc tests for error while reading the error status, it
> always return success (0). Fix this by propagating the return value.
>
> Fixes: d334a49113a4a33 ("ACPI, APEI, Generic Hardware Error Source memory error support")
> Signed-of-by: Punit Agrawal <punit.agrawa.@arm.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
> ---
> drivers/acpi/apei/ghes.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index f0a029e..0d099a2 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -662,7 +662,7 @@ static int ghes_proc(struct ghes *ghes)
> ghes_do_proc(ghes, ghes->estatus);
> out:
> ghes_clear_estatus(ghes);
> - return 0;
> + return rc;
> }
>
> static void ghes_add_timer(struct ghes *ghes)
>
Boris, all fine here?
Thanks,
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] acpi/apei: Fix in-correct return value
2016-10-21 21:28 ` Rafael J. Wysocki
@ 2016-10-22 16:37 ` Borislav Petkov
2016-10-23 0:09 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2016-10-22 16:37 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Punit Agrawal, linux-acpi, linux-kernel, tbaicar, Len Brown
On Fri, Oct 21, 2016 at 11:28:29PM +0200, Rafael J. Wysocki wrote:
> Boris, all fine here?
Short answer: Yeah, looks ok to me.
Longer answer: I mean, this way ghes_proc() *actually* propagates the
return value of ghes_read_estatus() and we don't do any processing if it
failed.
Which doesn't really tell me a whole lot about the actual processing,
i.e., what ghes_do_proc() did.
But ghes_do_proc() doesn't return anything and ghes_proc()'s retval is
used only in contexts where we're asking whether something got processed
or not.
And for that, that fix is adequate. So:
Reviewed-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] acpi/apei: Fix in-correct return value
2016-10-22 16:37 ` Borislav Petkov
@ 2016-10-23 0:09 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2016-10-23 0:09 UTC (permalink / raw)
To: Borislav Petkov
Cc: Punit Agrawal, linux-acpi, linux-kernel, tbaicar, Len Brown
On Saturday, October 22, 2016 06:37:35 PM Borislav Petkov wrote:
> On Fri, Oct 21, 2016 at 11:28:29PM +0200, Rafael J. Wysocki wrote:
> > Boris, all fine here?
>
> Short answer: Yeah, looks ok to me.
>
> Longer answer: I mean, this way ghes_proc() *actually* propagates the
> return value of ghes_read_estatus() and we don't do any processing if it
> failed.
>
> Which doesn't really tell me a whole lot about the actual processing,
> i.e., what ghes_do_proc() did.
>
> But ghes_do_proc() doesn't return anything and ghes_proc()'s retval is
> used only in contexts where we're asking whether something got processed
> or not.
>
> And for that, that fix is adequate. So:
>
> Reviewed-by: Borislav Petkov <bp@suse.de>
Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-23 0:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 16:07 [PATCH] acpi/apei: Fix in-correct return value Punit Agrawal
2016-10-20 19:51 ` Baicar, Tyler
2016-10-21 14:58 ` Punit Agrawal
2016-10-21 21:28 ` Rafael J. Wysocki
2016-10-22 16:37 ` Borislav Petkov
2016-10-23 0:09 ` 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