From patchwork Tue Mar 30 08:20:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduard - Gabriel Munteanu X-Patchwork-Id: 48974 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2EC32B7C7E for ; Wed, 31 Mar 2010 01:39:45 +1100 (EST) Received: from localhost ([127.0.0.1]:41551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwcbH-0005IB-Mo for incoming@patchwork.ozlabs.org; Tue, 30 Mar 2010 10:39:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwWgk-0003Qb-Ba for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:42 -0400 Received: from [140.186.70.92] (port=40403 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwWgd-0003MT-Ua for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwWgb-0004AD-0L for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:35 -0400 Received: from mail-bw0-f218.google.com ([209.85.218.218]:57837) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwWga-00048G-Rp for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:32 -0400 Received: by mail-bw0-f218.google.com with SMTP id 10so14273963bwz.2 for ; Tue, 30 Mar 2010 01:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=gz7su9+B0J9gFrGx1QGLVPSSUc8crl4m4UUm2qtu3SE=; b=ofFCdsX5U/AMXgOqnkr463CjUikmj0x5098kChM5airJz4m8jiOjDEaEU6Ekw1st8s q/SmzoXFe2BTdJ0hduWvxwkBR6gy6ZIY4TTt+THoiTfERgt6BYKZMXNYcLquhytky7S5 le4HwodUIxCfqjBk8ySiZ2iW9Jn/9Dl4Ca8Hw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=b1GotuIY91jzOjGW+75iVjCj6BgJVvdu20y+VtatTUFrJ7c3uEwgwfmrU1ERq9Q6IR B/rgwiG2/5nrOZtVCne5MKvLSda2RQpYFev9Z2bksSTUdSBh4ivr3lFEjayDp5+j9ZCQ ADz6qCaG1f99jN4McwWIbX6ZUMKv8Ze+5l6+c= Received: by 10.204.137.1 with SMTP id u1mr929074bkt.151.1269937228564; Tue, 30 Mar 2010 01:20:28 -0700 (PDT) Received: from localhost.localdomain ([188.25.93.130]) by mx.google.com with ESMTPS id 16sm2589620bwz.9.2010.03.30.01.20.27 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 01:20:28 -0700 (PDT) From: Eduard - Gabriel Munteanu To: joro@8bytes.org Date: Tue, 30 Mar 2010 11:20:07 +0300 Message-Id: X-Mailer: git-send-email 1.6.4.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Tue, 30 Mar 2010 10:21:07 -0400 Cc: aliguori@us.ibm.com, Eduard - Gabriel Munteanu , avi@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [Qemu-devel] [RFC PATCH 6/7] acpi: cleanup acpi_checksum() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This adds newlines in acpi_checksum() to separate the declarations, the body and the return statement. Signed-off-by: Eduard - Gabriel Munteanu --- hw/acpi.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index 3794f70..f067f85 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -832,9 +832,11 @@ size_t acpi_tables_len, acpi_tables_prev_len; static int acpi_checksum(const uint8_t *data, int len) { int sum, i; + sum = 0; for(i = 0; i < len; i++) sum += data[i]; + return (-sum) & 0xff; }