diff mbox

[1/3] acpi: checksum: reformat lines to fit into 80 columns

Message ID 1330427263-26803-2-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Feb. 28, 2012, 11:07 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/checksum/checksum.c |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

Comments

Keng-Yu Lin March 2, 2012, 11:35 a.m. UTC | #1
On Tue, Feb 28, 2012 at 7:07 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  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);
>        }
> --
> 1.7.9
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung March 8, 2012, 9:50 a.m. UTC | #2
On 02/28/2012 07:07 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   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);
>   	}
Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

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);
 	}