lkml.org 
[lkml]   [2016]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates
On Wed, Oct 19, 2016 at 12:32:00PM +0100, Matt Fleming wrote:
> Could you please invert the conditional? I had to read it 3 times to
> make sure it was correct given the comment that precedes it. E.g. this
> is preferable,
>
> if (efi_enabled(EFI_OLD_MEMMAP))
> ret = efi_call((void *)__va(tab->function), (u64)which, a1, a2, a3, a4, a5);
> else
> ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);

Sure, no problem! I generally default to checking for the more common
condition first, but I definitely see how that makes the code kind of
hard to read, in this case.

I'll send another version shortly.

Thanks, Matt!

\
 
 \ /
  Last update: 2016-10-19 18:21    [W:0.062 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site