From patchwork Fri Jun 30 05:26:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1801676 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=a1KE/nVb; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QskMy3cFGz20ZC for ; Fri, 30 Jun 2023 15:27:09 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qF6eo-00046E-7k; Fri, 30 Jun 2023 05:26:58 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qF6em-000460-3B for fwts-devel@lists.ubuntu.com; Fri, 30 Jun 2023 05:26:56 +0000 Received: from canonical.com (unknown [106.104.136.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 0A6C73F295 for ; Fri, 30 Jun 2023 05:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1688102815; bh=W/GrSJq/F9p3/9+XWWUdmgKAA2jQcoa9HDXaXfucCJg=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=a1KE/nVbo0enIFMUgDczHM9PH2QHUAnDGN+nBdxcjWYWw8j93sAteesC+U+qVPY/J x8a2xUr7wae5dFwM2xwlCyBc0M3NZzelHnN4Vx+zMbk5YLJsrpLwb4zWOMhTtVNW+G C8nTT6O3SD8U+RiBeEcUfEkv7vQNzN5FehYc/p8gkxvxAXkpW2Aesof43rxJSpvWrU t5CG+5nIO6C+x8exap2UOuMsyJPthpSjd/NeeBV3/6JWlNOPN5U0qRMjXkmjpWParl pYypFrQkXJ6B8be8MGqqcZLo4CRzoIYsDg80PtnEMJ6Ba4IRWkQK4C1gxivnc+Q3pb RQODy9FdIPXZg== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpi: mpam: fix build fail on bionic Date: Fri, 30 Jun 2023 13:26:47 +0800 Message-Id: <20230630052647.414707-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" BugLink: https://bugs.launchpad.net/fwts/+bug/2025419 acpi/mpam/mpam.c:118:6: error: a label can only be part of a statement and a declaration is not a statement fwts_interconnect_locator_descriptor *intc_loc_des = ^ acpi/mpam/mpam.c:120:6: error: expected expression before ‘fwts_interconnect_descriptor_table’ fwts_interconnect_descriptor_table *intc_des_table = (table->data + intc_loc_des->intc_des_tbl_offset); ^ acpi/mpam/mpam.c:126:39: error: ‘intc_des_table’ undeclared (first use in this function) fwts_hexdump_data_prefix_all(fw, intc_des_table->signature, " ", sizeof(intc_des_table->signature)); ^ acpi/mpam/mpam.c:126:39: note: each undeclared identifier is reported only once for each function it appears in acpi/mpam/mpam.c:118:44: error: unused variable ‘intc_loc_des’ [-Werror=unused-variable] fwts_interconnect_locator_descriptor *intc_loc_des = ^ acpi/mpam/mpam.c: At top level: Signed-off-by: Ivan Hu --- src/acpi/mpam/mpam.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/acpi/mpam/mpam.c b/src/acpi/mpam/mpam.c index caade74e..7d530889 100644 --- a/src/acpi/mpam/mpam.c +++ b/src/acpi/mpam/mpam.c @@ -89,6 +89,9 @@ static int mpam_test1(fwts_framework *fw) fwts_log_info_simp_int(fw, " Locator type: ", res_node->locator_type); fwts_log_info_verbatim(fw, " Locator:"); + fwts_interconnect_locator_descriptor *intc_loc_des = NULL; + fwts_interconnect_descriptor_table *intc_des_table = NULL; + switch(res_node->locator_type) { case FWTS_MPAM_PROCESSOR_CACHE: fwts_log_info_verbatim(fw, " Processor cache locator:"); @@ -115,9 +118,8 @@ static int mpam_test1(fwts_framework *fw) fwts_hexdump_data_prefix_all(fw, res_node->locator, " ", sizeof(res_node->locator)); break; case FWTS_MPAM_INTERCONNECT: - fwts_interconnect_locator_descriptor *intc_loc_des = - (fwts_interconnect_locator_descriptor *)res_node->locator; - fwts_interconnect_descriptor_table *intc_des_table = (table->data + intc_loc_des->intc_des_tbl_offset); + intc_loc_des = (fwts_interconnect_locator_descriptor *)res_node->locator; + intc_des_table = (table->data + intc_loc_des->intc_des_tbl_offset); fwts_log_info_verbatim(fw, " Interconnect locator:"); fwts_hexdump_data_prefix_all(fw, res_node->locator, " ", sizeof(res_node->locator)); fwts_acpi_reserved_zero_array(fw, "MPAM", "Locator", res_node->locator + 8, 4, &passed);