Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941043AbcJSOQI (ORCPT ); Wed, 19 Oct 2016 10:16:08 -0400 Received: from relay3.sgi.com ([192.48.152.1]:45042 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S940962AbcJSOQE (ORCPT ); Wed, 19 Oct 2016 10:16:04 -0400 Date: Wed, 19 Oct 2016 07:57:06 -0500 From: Alex Thorlton To: Matt Fleming Cc: Alex Thorlton , linux-kernel@vger.kernel.org, Mike Travis , Russ Anderson , Dimitri Sivanich , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Masahiro Yamada , x86@kernel.org, Ard Biesheuvel Subject: Re: [PATCH] x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates Message-ID: <20161019125706.GB207809@stormcage.americas.sgi.com> References: <1476794858-200667-1-git-send-email-athorlton@sgi.com> <20161019113200.GE31476@codeblueprint.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161019113200.GE31476@codeblueprint.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 652 Lines: 17 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!