From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9490521A0480E for ; Wed, 5 Apr 2017 06:19:42 -0700 (PDT) Received: by mail-wr0-x231.google.com with SMTP id w11so13529370wrc.3 for ; Wed, 05 Apr 2017 06:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IZYlYKZWn2haxkloHwCXWB5luLYf2DuhdtHirpoy438=; b=JELOSeg0s8nkUp612ABxxuMHHaelL/Z5vnGipFnGJqzt8lu13phoe+kYP35gTEJV10 CETJ5y28jBrN9drkM8qgr1gkVKomhgzdTEanDUlNdcxPvrjND/7N4Qh/Y8NBZxDerxur rkjvCH6OF7acdBjHL0uCuVof2MEk2JcVb5Tc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IZYlYKZWn2haxkloHwCXWB5luLYf2DuhdtHirpoy438=; b=qelvl5EGJrFPbtwObypRehS3nff3cVq39rjCfJEzLbvnVFNt85LLtWKUcocXJa4BiI n4RGHzdKOwZuqS2YHY/deGUxs5LbFvHlqrxBQSDG5psN8Bf3xe5k+7jC3gXie7VbzlU1 tZl5JBF8rJYB10Zsm6JuhVQiwL2NIT7Ky6EfSyuQ9LkzMh3nBhx+CygT3l8ZV9wVhpem YNOYjyZq2JdU6D9d69781ttlJO5FzKOEzn6ZJixuzM/yIzoYwfNdEZbrGX/gmARMfeb7 w0os/NelvIVL7FEETCrPG80CwmrjJgiB40FQY2BNiLFSJbLNLNR/7HR0LKb495T08Joo 2bLA== X-Gm-Message-State: AFeK/H1gRcrUyfG8K+Da4gRpyszX+y1lR61id1oBnWuJTc3tRkY38eiFGO++Q2a0HwJle6wA X-Received: by 10.223.155.200 with SMTP id e8mr23969346wrc.74.1491398381125; Wed, 05 Apr 2017 06:19:41 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id i133sm22363094wmg.26.2017.04.05.06.19.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 06:19:40 -0700 (PDT) Date: Wed, 5 Apr 2017 14:19:38 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, ryan.harkin@linaro.org Message-ID: <20170405131937.GF25239@bivouac.eciton.net> References: <20170404123010.11722-1-ard.biesheuvel@linaro.org> <20170404123010.11722-7-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170404123010.11722-7-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH v3 6/6] ArmPlatformPkg/ArmJunoDxe: simplify ACPI table installation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 13:19:43 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 04, 2017 at 01:30:10PM +0100, Ard Biesheuvel wrote: > Having a three way conditional with callbacks would make sense if the > callbacks weren't (a) identical and (b) didn't return TRUE all the > time. So get rid of the kludge. > Reviewed-by: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 37 +------------------- > 1 file changed, 1 insertion(+), 36 deletions(-) > > diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c > index f7e33961b4e7..da93eb582909 100644 > --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c > +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c > @@ -400,34 +400,6 @@ OnEndOfDxe ( > } > } > > -STATIC > -BOOLEAN > -AcpiTableJunoR0Check ( > - IN EFI_ACPI_DESCRIPTION_HEADER *AcpiHeader > - ) > -{ > - return TRUE; > -} > - > -STATIC > -BOOLEAN > -AcpiTableJunoR1Check ( > - IN EFI_ACPI_DESCRIPTION_HEADER *AcpiHeader > - ) > -{ > - return TRUE; > -} > - > -STATIC > -BOOLEAN > -AcpiTableJunoR2Check ( > - IN EFI_ACPI_DESCRIPTION_HEADER *AcpiHeader > - ) > -{ > - return TRUE; > -} > - > - > EFI_STATUS > EFIAPI > ArmJunoEntryPoint ( > @@ -517,14 +489,7 @@ ArmJunoEntryPoint ( > // > // Try to install the ACPI Tables > // > - if (JunoRevision == JUNO_REVISION_R0) { > - Status = LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile, AcpiTableJunoR0Check); > - } else if (JunoRevision == JUNO_REVISION_R1) { > - Status = LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile, AcpiTableJunoR1Check); > - } else if (JunoRevision == JUNO_REVISION_R2) { > - Status = LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile, AcpiTableJunoR2Check); > - } > - > + Status = LocateAndInstallAcpiFromFv (&mJunoAcpiTableFile); > ASSERT_EFI_ERROR (Status); > > // > -- > 2.9.3 >