From patchwork Tue Feb 28 11:07:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 143400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3E61CB6FA3 for ; Tue, 28 Feb 2012 22:07:49 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1S2KuJ-0003ZD-V2 for incoming@patchwork.ozlabs.org; Tue, 28 Feb 2012 11:07:48 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1S2KuG-0003Wb-Cl for fwts-devel@lists.ubuntu.com; Tue, 28 Feb 2012 11:07:44 +0000 Received: from cpc19-craw6-2-0-cust5.croy.cable.virginmedia.com ([77.102.228.6] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1S2KuG-0003qf-8I for fwts-devel@lists.ubuntu.com; Tue, 28 Feb 2012 11:07:44 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/3] acpi: checksum: reformat lines to fit into 80 columns Date: Tue, 28 Feb 2012 11:07:40 +0000 Message-Id: <1330427263-26803-2-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1330427263-26803-1-git-send-email-colin.king@canonical.com> References: <1330427263-26803-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Alex Hung --- src/acpi/checksum/checksum.c | 33 ++++++++++++++++++++++----------- 1 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c index 5562d46..726f0f1 100644 --- a/src/acpi/checksum/checksum.c +++ b/src/acpi/checksum/checksum.c @@ -33,7 +33,8 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) if (table->length < 20) { fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP", - "RSDP was expected to be at least 20 bytes long, got a shorted size of %d bytes.", + "RSDP was expected to be at least 20 bytes long, " + "got a shorted size of %d bytes.", (int)table->length); /* Won't test on a short RSDP */ return; @@ -43,18 +44,25 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) checksum = fwts_checksum(table->data, 20); if (checksum != 0) fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableChecksumRSDP", - "RSDP has incorrect checksum, expected 0x%2.2x, got 0x%2.2x.", + "RSDP has incorrect checksum, expected 0x%2.2x, " + "got 0x%2.2x.", (uint8_t)(rsdp->checksum)-checksum, rsdp->checksum); else - fwts_passed(fw, "Table RSDP has correct checksum 0x%x.", rsdp->checksum); + fwts_passed(fw, "Table RSDP has correct checksum 0x%x.", + rsdp->checksum); - /* Version 2.0 RSP or more. Note ACPI 1.0 is indicated by a zero version number */ + /* + * Version 2.0 RSP or more. Note ACPI 1.0 is indicated by a + * zero version number + */ if (rsdp->revision > 0) { if (table->length < sizeof(fwts_acpi_table_rsdp)) { fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP", - "RSDP was expected to be %d bytes long, got a shorted size of %d bytes.", - (int)sizeof(fwts_acpi_table_rsdp), (int)table->length); + "RSDP was expected to be %d bytes long, " + "got a shorted size of %d bytes.", + (int)sizeof(fwts_acpi_table_rsdp), + (int)table->length); /* Won't test on a short RSDP */ return; } @@ -62,12 +70,13 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) if (checksum != 0) fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableChecksumRSDP", - "RSDP has incorrect extended checksum, expected 0x%2.2x, got 0x%2.2x.", + "RSDP has incorrect extended checksum, " + "expected 0x%2.2x, got 0x%2.2x.", (uint8_t)(rsdp->extended_checksum-checksum), rsdp->extended_checksum); else - fwts_passed(fw, "Table RSDP has correct extended checksum 0x%x.", rsdp->extended_checksum); - + fwts_passed(fw, "Table RSDP has correct extended " + "checksum 0x%x.", rsdp->extended_checksum); } } @@ -100,10 +109,12 @@ static int checksum_scan_tables(fwts_framework *fw) checksum = fwts_checksum(table->data, table->length); if (checksum == 0) - fwts_passed(fw, "Table %s has correct checksum 0x%x.", table->name, hdr->checksum); + fwts_passed(fw, "Table %s has correct checksum 0x%x.", + table->name, hdr->checksum); else { fwts_failed(fw, LOG_LEVEL_LOW, "ACPITableChecksum", - "Table %s has incorrect checksum, expected 0x%2.2x, got 0x%2.2x.", + "Table %s has incorrect checksum, " + "expected 0x%2.2x, got 0x%2.2x.", table->name, (uint8_t)(hdr->checksum-checksum), hdr->checksum); } fwts_tag_failed(fw, FWTS_TAG_ACPI_TABLE_CHECKSUM); }