On 03/24/16 14:35, Ard Biesheuvel wrote:
> On 24 March 2016 at 11:36, Laszlo Ersek <ler...@redhat.com> wrote:

>> Maintainers are invited to exert caution while reviewing the patches.
>> Namely, in a few cases, the silencing is almost certainly wrong, and
>> should be replaced with proper error checking. These are the cases when
>> a Status variable is set from a function call, but then never checked. I
>> didn't try to handle these errors myself; I just removed the Status
>> variable.
>>
> 
> I suppose it would generally be more correct to add a
> ASSERT_EFI_ERROR(Status) rather than remove Status entirely. However,
> this may not be universally true, so it is up to the respective
> maintainers to decide whether a) the function call is assumed to
> succeed or b) the function call may fail but we don't care. The ASSERT
> only covers a)

Interestingly, in some cases the error is handled anyway, by virtue of
the called function's output parameters not changing on error (e.g.,
some "count" output parameter is pre-set to 0, and if it is still zero
after the call, the loop following the call will run zero times). This
would be a subset of (b), I think -- we don't care specifically about
the return status, but the possible outcomes are all handled
nonetheless, uniformly.

So yes, I think this should be decided by the individual maintainers.

Thanks!
Laszlo

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to