From nobody Sat Nov 2 12:28:50 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 1491309039735300.0290288446862; Tue, 4 Apr 2017 05:30:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2D3552050A8A9; Tue, 4 Apr 2017 05:30:36 -0700 (PDT) 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) 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) 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=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) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org 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: [edk2] [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: , Cc: 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 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