From nobody Sun Nov 24 10:26:51 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1723793896; cv=none; d=zohomail.com; s=zohoarc; b=nYbEQxoMuE56WVFVU3YK9j/GwYqUdr9Hia3dvWYG1izoEQ+GqgW8ZIgWfaPwyS/205hwrnXhcNuhyWHnEw13yarvhYaawiKytp0hOQs2qK0P0xqIEoCJqvOBuIsSmknLeGKoRl/P4CZTftHaTYGbzrYVUFWtrwQnmSsWyfc3UN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723793896; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:Message-Id:Reply-To:To; bh=puy9/q0FJeBZb0lxd9lCRNQ7oodRkvl1p/JyCRa3Pgo=; b=hreI2mevUZS6YG9Vx49OXosWV3ud2EBdzXAQ/EkoWdHMk1w5cC3QBfpU6eCKhO60UvDzODltz2W8jvOS0zRj5u9zQ9X/49TtwgPcP7umCNUr+PiDRtyHn+RbITwemRJcneQt92DUbUCztI/fJrCoDUazrvNpfxWaK/Yw3YxsrmY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723793896879948.3944724800391; Fri, 16 Aug 2024 00:38:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1serX8-0006sa-N1; Fri, 16 Aug 2024 03:38:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1serX4-0006c4-UP; Fri, 16 Aug 2024 03:37:58 -0400 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1serX2-0005uJ-4T; Fri, 16 Aug 2024 03:37:58 -0400 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D509B62110; Fri, 16 Aug 2024 07:37:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99C56C4AF1B; Fri, 16 Aug 2024 07:37:53 +0000 (UTC) Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1serWx-000000055f3-31wS; Fri, 16 Aug 2024 09:37:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723793873; bh=/UrLD39uTtqzLQxF34eTLlBfA+BnxRQyD1jfJGYlCXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bmr4TPJOs8R126ZTZujoL+kcn4vqs4uJF2xQupXLwWPFzrqf73Bc6iWDbnBEsEzPA 5Vn7z74PF+PHT8U9y9vhXVH+olR89WFT2N4yV0UptS7U4hBHn+Sif18rUMP8YHxuwP tMlvrX5tRlJ6NTjCPzfA80YIhvJZXihhEKsdHWZin/8oo/OUQ/U4PCkNF023/498Gp PTnhYX372f1bmpVv0z9OqhxR0NwEoFhCT36YVBSErUM3yvjRtoFut6N9kvHDsyJYkd hRxn9x+chujIKeIkBGiA60VOvsIyhRUevXnHAZnvOQNwPjXbhPxKifQWiDHMMyn1jv 21I5Y/d2caiGg== From: Mauro Carvalho Chehab To: Cc: Jonathan Cameron , Shiju Jose , Mauro Carvalho Chehab , "Michael S. Tsirkin" , Ani Sinha , Dongjiu Geng , Igor Mammedov , linux-kernel@vger.kernel.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH v8 12/13] acpi/ghes: cleanup generic error data logic Date: Fri, 16 Aug 2024 09:37:44 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2604:1380:4641:c500::1; envelope-from=mchehab+huawei@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.131, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1723793898754116600 Content-Type: text/plain; charset="utf-8" Remove comments that are obvious. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index 4f7b6c5ad2b6..a822a5eafaa0 100644 --- a/hw/acpi/ghes.c +++ b/hw/acpi/ghes.c @@ -130,34 +130,28 @@ static void build_ghes_hw_error_notification(GArray *= table, const uint8_t type) * ACPI 6.1: 18.3.2.7.1 Generic Error Data */ static void acpi_ghes_generic_error_data(GArray *table, - const uint8_t *section_type, uint32_t error_severity, - uint8_t validation_bits, uint8_t flags, - uint32_t error_data_length, QemuUUID fru_id, - uint64_t time_stamp) + const uint8_t *section_type, + uint32_t error_severity, + uint8_t validation_bits, + uint8_t flags, + uint32_t error_data_length, + QemuUUID fru_id, + uint64_t time_stamp) { const uint8_t fru_text[20] =3D {0}; =20 - /* Section Type */ g_array_append_vals(table, section_type, 16); - - /* Error Severity */ build_append_int_noprefix(table, error_severity, 4); + /* Revision */ build_append_int_noprefix(table, 0x300, 2); - /* Validation Bits */ + build_append_int_noprefix(table, validation_bits, 1); - /* Flags */ build_append_int_noprefix(table, flags, 1); - /* Error Data Length */ build_append_int_noprefix(table, error_data_length, 4); =20 - /* FRU Id */ g_array_append_vals(table, fru_id.data, ARRAY_SIZE(fru_id.data)); - - /* FRU Text */ g_array_append_vals(table, fru_text, sizeof(fru_text)); - - /* Timestamp */ build_append_int_noprefix(table, time_stamp, 8); } =20 @@ -165,19 +159,17 @@ static void acpi_ghes_generic_error_data(GArray *tabl= e, * Generic Error Status Block * ACPI 6.1: 18.3.2.7.1 Generic Error Data */ -static void acpi_ghes_generic_error_status(GArray *table, uint32_t block_s= tatus, - uint32_t raw_data_offset, uint32_t raw_data_length, - uint32_t data_length, uint32_t error_severity) +static void acpi_ghes_generic_error_status(GArray *table, + uint32_t block_status, + uint32_t raw_data_offset, + uint32_t raw_data_length, + uint32_t data_length, + uint32_t error_severity) { - /* Block Status */ build_append_int_noprefix(table, block_status, 4); - /* Raw Data Offset */ build_append_int_noprefix(table, raw_data_offset, 4); - /* Raw Data Length */ build_append_int_noprefix(table, raw_data_length, 4); - /* Data Length */ build_append_int_noprefix(table, data_length, 4); - /* Error Severity */ build_append_int_noprefix(table, error_severity, 4); } =20 --=20 2.46.0