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

From: Andy Shevchenko
Date: Mon Aug 28 2017 - 13:44:29 EST


On Mon, Aug 28, 2017 at 8:25 PM, Borislav Petkov <bp@xxxxxxx> 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 compound if-statement or two
> simple ones, the second one with an explanatory comment?

For my opinion, since you asked, the either case needs a comment on
top of that additional check.
Separate conditionals in independent cases are, of course, better.
Though, here they are dependent (as I read from commit message).
So, _personally_ I would go with compound one, but note first sentence
in this response.

--
With Best Regards,
Andy Shevchenko