Patchwork [2/2] cmos: cmosdump: minor code tidy up, formatting

login
register
mail settings
Submitter Colin King
Date April 24, 2013, 9:22 a.m.
Message ID <1366795345-4404-3-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/239092/
State Accepted
Headers show

Comments

Colin King - April 24, 2013, 9:22 a.m.
From: Colin Ian King <colin.king@canonical.com>

Just some minor tidying up of the code. No functional changes.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/cmos/cmosdump/cmosdump.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Alex Hung - April 25, 2013, 4 a.m.
On 04/24/2013 05:22 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Just some minor tidying up of the code. No functional changes.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/cmos/cmosdump/cmosdump.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/cmos/cmosdump/cmosdump.c b/src/cmos/cmosdump/cmosdump.c
> index 5cc8277..85af24d 100644
> --- a/src/cmos/cmosdump/cmosdump.c
> +++ b/src/cmos/cmosdump/cmosdump.c
> @@ -119,7 +119,7 @@ static int cmosdump_test1(fwts_framework *fw)
>   	unsigned char data[0x80];
>
>   	/* Read CMOS Data */
> -	for (i=0;i<(int)sizeof(data); i++) {
> +	for (i = 0;i < (int)sizeof(data); i++) {
>   		if (fwts_cmos_read(i, &data[i]) != FWTS_OK) {
>   			fwts_log_error(fw, "Cannot get read/write permission on I/O ports.");
>   			return FWTS_ERROR;
> @@ -127,7 +127,7 @@ static int cmosdump_test1(fwts_framework *fw)
>   	}
>
>   	fwts_log_info_verbatum(fw, "CMOS Memory Dump:");
> -	for (i=0;i<(int)sizeof(data); i+= 16) {
> +	for (i = 0; i < (int)sizeof(data); i += 16) {
>   		char buffer[128];
>   		fwts_dump_raw_data(buffer, sizeof(buffer), data + i, i, 16);
>   		fwts_log_info_verbatum(fw, "%s", buffer);
> @@ -314,7 +314,6 @@ static int cmosdump_test1(fwts_framework *fw)
>   	return FWTS_OK;
>   }
>
> -
>   static fwts_framework_minor_test cmosdump_tests[] = {
>   	{ cmosdump_test1, "Dump CMOS Memory." },
>   	{ NULL, NULL }
>
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - April 26, 2013, 2:17 a.m.
On Wed, Apr 24, 2013 at 5:22 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Just some minor tidying up of the code. No functional changes.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/cmos/cmosdump/cmosdump.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/cmos/cmosdump/cmosdump.c b/src/cmos/cmosdump/cmosdump.c
> index 5cc8277..85af24d 100644
> --- a/src/cmos/cmosdump/cmosdump.c
> +++ b/src/cmos/cmosdump/cmosdump.c
> @@ -119,7 +119,7 @@ static int cmosdump_test1(fwts_framework *fw)
>         unsigned char data[0x80];
>
>         /* Read CMOS Data */
> -       for (i=0;i<(int)sizeof(data); i++) {
> +       for (i = 0;i < (int)sizeof(data); i++) {
>                 if (fwts_cmos_read(i, &data[i]) != FWTS_OK) {
>                         fwts_log_error(fw, "Cannot get read/write permission on I/O ports.");
>                         return FWTS_ERROR;
> @@ -127,7 +127,7 @@ static int cmosdump_test1(fwts_framework *fw)
>         }
>
>         fwts_log_info_verbatum(fw, "CMOS Memory Dump:");
> -       for (i=0;i<(int)sizeof(data); i+= 16) {
> +       for (i = 0; i < (int)sizeof(data); i += 16) {
>                 char buffer[128];
>                 fwts_dump_raw_data(buffer, sizeof(buffer), data + i, i, 16);
>                 fwts_log_info_verbatum(fw, "%s", buffer);
> @@ -314,7 +314,6 @@ static int cmosdump_test1(fwts_framework *fw)
>         return FWTS_OK;
>  }
>
> -
>  static fwts_framework_minor_test cmosdump_tests[] = {
>         { cmosdump_test1, "Dump CMOS Memory." },
>         { NULL, NULL }
> --
> 1.8.1.2
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/cmos/cmosdump/cmosdump.c b/src/cmos/cmosdump/cmosdump.c
index 5cc8277..85af24d 100644
--- a/src/cmos/cmosdump/cmosdump.c
+++ b/src/cmos/cmosdump/cmosdump.c
@@ -119,7 +119,7 @@  static int cmosdump_test1(fwts_framework *fw)
 	unsigned char data[0x80];
 
 	/* Read CMOS Data */
-	for (i=0;i<(int)sizeof(data); i++) {
+	for (i = 0;i < (int)sizeof(data); i++) {
 		if (fwts_cmos_read(i, &data[i]) != FWTS_OK) {
 			fwts_log_error(fw, "Cannot get read/write permission on I/O ports.");
 			return FWTS_ERROR;
@@ -127,7 +127,7 @@  static int cmosdump_test1(fwts_framework *fw)
 	}
 
 	fwts_log_info_verbatum(fw, "CMOS Memory Dump:");
-	for (i=0;i<(int)sizeof(data); i+= 16) {
+	for (i = 0; i < (int)sizeof(data); i += 16) {
 		char buffer[128];
 		fwts_dump_raw_data(buffer, sizeof(buffer), data + i, i, 16);
 		fwts_log_info_verbatum(fw, "%s", buffer);
@@ -314,7 +314,6 @@  static int cmosdump_test1(fwts_framework *fw)
 	return FWTS_OK;
 }
 
-
 static fwts_framework_minor_test cmosdump_tests[] = {
 	{ cmosdump_test1, "Dump CMOS Memory." },
 	{ NULL, NULL }