From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (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 5C18221A04811 for ; Wed, 5 Apr 2017 06:58:31 -0700 (PDT) Received: by mail-wr0-x234.google.com with SMTP id w43so15343951wrb.0 for ; Wed, 05 Apr 2017 06:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FXhSxiFL+5WeE4Qdi2QPFODrmi23jx3T1Uq98VFvGRc=; b=evXoNU3pe1ylCdUmOUN2l3XkcwCLCkC1VYHnp88+JhllkZFeTApV4sUwroQOUGzaB0 5nI3nN0otqn27cHdXfkzGN/NLsybREsszTz3ZYbPYKNUrfvEr8yv7/wwm6X81ZgvxPv3 W6CNbeNnjYHCyk1SJm5Ngx3kzNJGiLv0fueiM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FXhSxiFL+5WeE4Qdi2QPFODrmi23jx3T1Uq98VFvGRc=; b=FwqC7nE2teFXDb+TlwkgWsgr9nj2al5BdporB0N65SctugaURxEjspl0GeAeBWuYJM WET3bXgCOW9hDtXyu1Cz6MaF/KYJQTUPw+VzAL6nCyEE3qa/b0cuHATYoz4dkdXu9Sve zcb1MrfvM+ValPXZFrq2REfYKOy2BF1AKwJ+hZDs4jemfu7JR0I6VeRp60hlnHLmxXOb ppxGh/aqS9tjJREu4xaGSMPTA9ezyuMvEa/TC6hMB6dUyPbhIJ+X+OOrsArMofAPhSQn YPaN4WasnUarnbRvBxjRb7wl3U3BzDEEXWrNYCnIqJfHBdoodCsI1G4hoJKTMir3aHKH jvNw== X-Gm-Message-State: AFeK/H2SgKuGzakqrBjLHBwBJ8yT1GZC4VlBKqPaAZD+fbb9sewY1Rm/Vh63SQbD9yGTQSOK X-Received: by 10.223.169.20 with SMTP id u20mr4638297wrc.68.1491400709358; Wed, 05 Apr 2017 06:58:29 -0700 (PDT) Received: from localhost.localdomain ([160.163.145.113]) by smtp.gmail.com with ESMTPSA id 127sm22522793wmt.20.2017.04.05.06.58.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 06:58:28 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ryan.harkin@linaro.org, Ard Biesheuvel Date: Wed, 5 Apr 2017 14:58:07 +0100 Message-Id: <20170405135807.28425-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170405135807.28425-1-ard.biesheuvel@linaro.org> References: <20170405135807.28425-1-ard.biesheuvel@linaro.org> Subject: [PATCH v4 resend v4 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:58:31 -0000 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Tested-by: Ryan Harkin Reviewed-by: Leif Lindholm --- 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