From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (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 6D8D72193930E for ; Tue, 4 Apr 2017 05:30:34 -0700 (PDT) Received: by mail-wr0-x235.google.com with SMTP id k6so208515619wre.2 for ; Tue, 04 Apr 2017 05:30:34 -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=i0hJ9GP5b3Vi1kbsbAPMCg3vwJXmYE7djJ+Kh9fzaNU=; b=kO8wBNWSlydS1oT821FlpvAa4bjY5jN6xHAn1RPaa+yF4Ga6pmS9nUbIxXN29nrSfU MKqJUVOrd7KdOp+TlpuSojtnteyfbZSGqzYN4B3XYzseSPwPLSPb987sPBLStypblAou ggtBkGoXD+FTTc2gwk5nn+x5CTNj7kOepb9Xo= 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=i0hJ9GP5b3Vi1kbsbAPMCg3vwJXmYE7djJ+Kh9fzaNU=; b=TkxeI8hhCAbZlqlmLEe7JjXkTrpeV0ZBSa9AYCTp1oTJ9276KfbwJQEr1/35TYBIBC pLnTxVxOpVbSC4h39nJEv6maqJHMqR7MkBTH2WVcERdJKghKhQAhA1taVl5fPL0KhSuG dJ9oKS3w0TpQ9TZaDRvZ6dR2a8yRwZrCIpuEKpD9K3xA8a8VliVI4Y6cSHedDxGClNAc xElHtUHbdYWLeIKszxgOW+09k9NdP+1FUcrVxQSucOpKoMXkry2u9p0Qbdu/UjU+BZdK KAaj4cjgLIWXPPUuCCsvjSgKsYVJoSfXk01n8dZlyE2iIRVF5FTjrlJ71cKKyceTBT+d /wqw== X-Gm-Message-State: AFeK/H0SOvYiKhBJVswYjoM2w5+fJUQTPWr/fe40roEI4UR/M0SokPIj3tbZWUCo8tRK8qR9 X-Received: by 10.223.178.172 with SMTP id g41mr19061505wrd.126.1491309031932; Tue, 04 Apr 2017 05:30:31 -0700 (PDT) Received: from localhost.localdomain ([160.163.145.113]) by smtp.gmail.com with ESMTPSA id 24sm22162490wrw.46.2017.04.04.05.30.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 05:30:31 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org Cc: Ard Biesheuvel Date: Tue, 4 Apr 2017 13:30:10 +0100 Message-Id: <20170404123010.11722-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170404123010.11722-1-ard.biesheuvel@linaro.org> References: <20170404123010.11722-1-ard.biesheuvel@linaro.org> Subject: [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: Tue, 04 Apr 2017 12:30:34 -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 --- 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