From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (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 8046C2008030A for ; Fri, 31 Mar 2017 07:15:02 -0700 (PDT) Received: by mail-wr0-x22b.google.com with SMTP id w11so107045541wrc.3 for ; Fri, 31 Mar 2017 07:15:02 -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=ZVRLEu053z1mn/j/nTfqngodWxH7n67CNot/uECGr4I=; b=NXWK393zVGEMPTDaoEqk+wNcvW64943pc3QSvF2Fpcp9D77qo+1ZKd09deTMHLikCA AwDGHnropbO+FrMX08XBdiC5dp/gwjJwjg5EfN6ecmh6/MsJQyKqqB+RosStG+8W4RIE 6e2G/kqFYWWWN09mtv353lERV5uZXpuYlLmh0= 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=ZVRLEu053z1mn/j/nTfqngodWxH7n67CNot/uECGr4I=; b=fTQmQEAtavN/Q2S2EE7HpNFpao7sm1MmrUY4y43djB/yrmnlvNUZTpYe8SAHUoY0oA 3eOPbe6ax95c03deRga/7vEXT8nI+R6rU4zH6QKIMmpy5OGpWWAKwnjCiHdbJuE8mC5Z Sdq9Nrt7ltSzJak6ZIuPyYVfTFq7hrm8949h5d5x3JkW51OxFZXTZW+OES0Toxr8sDpF mjn/eds6cr3pROge/3roBzYoMHKptP/PEWaAl7rHJFLV5ZUJ8yKdH8bGRh+ukVHXzQR4 1Ml6YW95Lgiipn05PCXDdvKveeAj/Ewg4ae8Jp/2MCmtCmdzogoEXIjM9MBDWeCgBnp7 el4g== X-Gm-Message-State: AFeK/H0GIY9/4mS1AbfRRkxRC6tw3YiFyW2KLMj0EXT0cPhrSvE0vigvr881yoEPzXDtzZkj X-Received: by 10.28.215.18 with SMTP id o18mr3598942wmg.98.1490969701176; Fri, 31 Mar 2017 07:15:01 -0700 (PDT) Received: from localhost.localdomain ([160.171.180.74]) by smtp.gmail.com with ESMTPSA id b42sm6908720wra.36.2017.03.31.07.14.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 07:15:00 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org Cc: Ard Biesheuvel Date: Fri, 31 Mar 2017 15:14:33 +0100 Message-Id: <20170331141434.20810-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170331141434.20810-1-ard.biesheuvel@linaro.org> References: <20170331141434.20810-1-ard.biesheuvel@linaro.org> Subject: [PATCH v2 8/9] 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: Fri, 31 Mar 2017 14:15:03 -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 14ff189a3078..2b3cca944cf1 100644 --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c @@ -405,34 +405,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 ( @@ -538,14 +510,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