From patchwork Mon Apr 15 20:47:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 236726 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 229C92C00C7 for ; Tue, 16 Apr 2013 07:03:01 +1000 (EST) Received: from localhost ([::1]:42734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URqJm-0007Zz-1N for incoming@patchwork.ozlabs.org; Mon, 15 Apr 2013 16:48:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URqHe-000409-B7 for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:45:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URqHZ-0004dq-Uw for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:45:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URqHZ-0004df-K5 for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:45:45 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3FKjiV6003511 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Apr 2013 16:45:45 -0400 Received: from lacos-laptop.usersys.redhat.com (vpn1-4-113.ams2.redhat.com [10.36.4.113]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3FKjb5e030093; Mon, 15 Apr 2013 16:45:44 -0400 From: Laszlo Ersek To: qemu-devel@nongnu.org, mst@redhat.com Date: Mon, 15 Apr 2013 22:47:50 +0200 Message-Id: <1366058872-11196-6-git-send-email-lersek@redhat.com> In-Reply-To: <1366058872-11196-1-git-send-email-lersek@redhat.com> References: <1366058872-11196-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 5/7] hw/acpi: export acpi_checksum() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Again, this enables reuse when preparing per-table fw_cfg blobs later. Signed-off-by: Laszlo Ersek --- include/hw/acpi/acpi.h | 2 ++ hw/acpi/core.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index bc7e107..7e51110 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -180,4 +180,6 @@ typedef struct acpi_table_std_header { } QEMU_PACKED AcpiTableStdHdr; extern const AcpiTableStdHdr acpi_dfl_hdr; + +int acpi_checksum(const uint8_t *data, int len); #endif /* !QEMU_HW_ACPI_H */ diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 36a4d03..3be7e09 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -69,7 +69,7 @@ static void acpi_register_config(void) machine_init(acpi_register_config); -static int acpi_checksum(const uint8_t *data, int len) +int acpi_checksum(const uint8_t *data, int len) { int sum, i; sum = 0;