From nobody Sat Nov 2 12:24:39 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 1490969713763636.0008931499202; Fri, 31 Mar 2017 07:15:13 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 583E220080310; Fri, 31 Mar 2017 07:15:04 -0700 (PDT) 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) 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) 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=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) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org 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: [edk2] [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: , 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 --- 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 14ff189a3078..2b3cca944cf1 100644 --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c @@ -405,34 +405,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 ( @@ -538,14 +510,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