Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-09-21 Thread Tyler Baicar
On 9/13/2017 8:40 AM, Baicar, Tyler wrote: On 8/29/2017 2:16 AM, Borislav Petkov wrote: On Mon, Aug 28, 2017 at 10:53:41AM -0600, Tyler Baicar wrote: Currently we acknowledge errors before clearing the error status. This could cause a new error to be populated by firmware in-between the error a

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-09-13 Thread Baicar, Tyler
On 8/29/2017 2:16 AM, Borislav Petkov wrote: On Mon, Aug 28, 2017 at 10:53:41AM -0600, Tyler Baicar wrote: Currently we acknowledge errors before clearing the error status. This could cause a new error to be populated by firmware in-between the error acknowledgment and the error status clearing

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-29 Thread Borislav Petkov
On Mon, Aug 28, 2017 at 10:53:41AM -0600, Tyler Baicar wrote: > Currently we acknowledge errors before clearing the error status. > This could cause a new error to be populated by firmware in-between > the error acknowledgment and the error status clearing which would > cause the second error's sta

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Andy Shevchenko
On Mon, Aug 28, 2017 at 9:27 PM, Borislav Petkov wrote: > On Mon, Aug 28, 2017 at 08:44:21PM +0300, Andy Shevchenko wrote: >> For my opinion, since you asked, the either case needs a comment on >> top of that additional check. > > That's because the comment belongs to the v2 part of the check. So

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Andy Shevchenko
On Mon, Aug 28, 2017 at 9:27 PM, Borislav Petkov wrote: > On Mon, Aug 28, 2017 at 08:44:21PM +0300, Andy Shevchenko wrote: >> For my opinion, since you asked, the either case needs a comment on >> top of that additional check. > > That's because the comment belongs to the v2 part of the check. > >

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Borislav Petkov
On Mon, Aug 28, 2017 at 08:44:21PM +0300, Andy Shevchenko wrote: > For my opinion, since you asked, the either case needs a comment on > top of that additional check. That's because the comment belongs to the v2 part of the check. > Separate conditionals in independent cases are, of course, bette

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Andy Shevchenko
On Mon, Aug 28, 2017 at 8:25 PM, Borislav Petkov wrote: > On Mon, Aug 28, 2017 at 08:20:37PM +0300, Andy Shevchenko wrote: >>if (rc != -ENOENT && is_hest_type_generic_v2(ghes)) >> :-) >> >> But again, your call to choose :-) > > Slow down please. > > What do you think is more readable: a

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Borislav Petkov
On Mon, Aug 28, 2017 at 08:20:37PM +0300, Andy Shevchenko wrote: >if (rc != -ENOENT && is_hest_type_generic_v2(ghes)) > :-) > > But again, your call to choose :-) Slow down please. What do you think is more readable: a compound if-statement or two simple ones, the second one with an exp

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Andy Shevchenko
On Mon, Aug 28, 2017 at 8:14 PM, Borislav Petkov wrote: > On Mon, Aug 28, 2017 at 08:01:00PM +0300, Andy Shevchenko wrote: >> You can also do this here, like >> if (is_hest_type_generic_v2(ghes) && rc != -ENOENT) > > https://lkml.kernel.org/r/20170824081408.iwg7qyyr226bt...@pd.tnic i

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Borislav Petkov
On Mon, Aug 28, 2017 at 08:01:00PM +0300, Andy Shevchenko wrote: > You can also do this here, like > if (is_hest_type_generic_v2(ghes) && rc != -ENOENT) https://lkml.kernel.org/r/20170824081408.iwg7qyyr226bt...@pd.tnic -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, J

Re: [PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Andy Shevchenko
On Mon, 2017-08-28 at 10:53 -0600, Tyler Baicar wrote: > Currently we acknowledge errors before clearing the error status. > This could cause a new error to be populated by firmware in-between > the error acknowledgment and the error status clearing which would > cause the second error's status to

[PATCH V3] acpi: apei: clear error status before acknowledging the error

2017-08-28 Thread Tyler Baicar
Currently we acknowledge errors before clearing the error status. This could cause a new error to be populated by firmware in-between the error acknowledgment and the error status clearing which would cause the second error's status to be cleared without being handled. So, clear the error status be