From nobody Sat Nov 2 12:16:21 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1491400719693959.0610887363724; Wed, 5 Apr 2017 06:58:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8E7D720D77DAD; Wed, 5 Apr 2017 06:58:32 -0700 (PDT) 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) 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) X-Original-To: edk2-devel@lists.01.org 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) From: Ard Biesheuvel To: edk2-devel@lists.01.org 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: [edk2] [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: , Cc: ryan.harkin@linaro.org, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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/Ar= mPlatformPkg/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 ( } } =20 -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 =3D=3D JUNO_REVISION_R0) { - Status =3D LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile,= AcpiTableJunoR0Check); - } else if (JunoRevision =3D=3D JUNO_REVISION_R1) { - Status =3D LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile,= AcpiTableJunoR1Check); - } else if (JunoRevision =3D=3D JUNO_REVISION_R2) { - Status =3D LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile,= AcpiTableJunoR2Check); - } - + Status =3D LocateAndInstallAcpiFromFv (&mJunoAcpiTableFile); ASSERT_EFI_ERROR (Status); =20 // --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel