From patchwork Fri Jun 17 08:14:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Peng X-Patchwork-Id: 9183037 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 50CF260776 for ; Fri, 17 Jun 2016 08:27:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D5022838A for ; Fri, 17 Jun 2016 08:27:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E69728390; Fri, 17 Jun 2016 08:27:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA6B0283A2 for ; Fri, 17 Jun 2016 08:27:30 +0000 (UTC) Received: from localhost ([::1]:54748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDp7h-0008Vs-C5 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 17 Jun 2016 04:27:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDp12-00028L-Ie for qemu-devel@nongnu.org; Fri, 17 Jun 2016 04:20:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDp0y-0007CJ-Ll for qemu-devel@nongnu.org; Fri, 17 Jun 2016 04:20:36 -0400 Received: from mga02.intel.com ([134.134.136.20]:55279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDp0y-0007Ag-Al for qemu-devel@nongnu.org; Fri, 17 Jun 2016 04:20:32 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 17 Jun 2016 01:20:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,482,1459839600"; d="scan'208";a="989448676" Received: from vmm-docker1.bj.intel.com ([10.240.193.52]) by fmsmga001.fm.intel.com with ESMTP; 17 Jun 2016 01:20:30 -0700 From: Chao Peng To: qemu-devel@nongnu.org Date: Fri, 17 Jun 2016 04:14:13 -0400 Message-Id: <1466151257-96318-6-git-send-email-chao.p.peng@linux.intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1466151257-96318-1-git-send-email-chao.p.peng@linux.intel.com> References: <1466151257-96318-1-git-send-email-chao.p.peng@linux.intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.20 Subject: [Qemu-devel] [RFC 5/9] acpi: expose acpi_checksum() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Haozhong Zhang , Xiao Guangrong , Eduardo Habkost , "Michael S. Tsirkin" , Paolo Bonzini , gor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Haozhong Zhang It will be used in later commits. Signed-off-by: Haozhong Zhang --- hw/acpi/core.c | 2 +- include/hw/acpi/acpi.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index d24b9a9..70ad6ff 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -69,7 +69,7 @@ static void acpi_register_config(void) opts_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; diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index c717f15..b23eff8 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -188,4 +188,6 @@ struct AcpiSlicOem { }; int acpi_get_slic_oem(AcpiSlicOem *oem); +int acpi_checksum(const uint8_t *data, int len); + #endif /* !QEMU_HW_ACPI_H */