Patchwork [2/2] acpi: wakealarm: minor tidy up to the test

login
register
mail settings
Submitter Colin King
Date June 3, 2013, 9:15 a.m.
Message ID <1370250917-3561-3-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/248208/
State Accepted
Headers show

Comments

Colin King - June 3, 2013, 9:15 a.m.
From: Colin Ian King <colin.king@canonical.com>

constify wkalarm, minor re-formatting to the for statement.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/wakealarm/wakealarm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Keng-Yu Lin - June 4, 2013, 6:36 a.m.
On Mon, Jun 3, 2013 at 5:15 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> constify wkalarm, minor re-formatting to the for statement.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/wakealarm/wakealarm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/wakealarm/wakealarm.c b/src/acpi/wakealarm/wakealarm.c
> index b9736ca..7f4886a 100644
> --- a/src/acpi/wakealarm/wakealarm.c
> +++ b/src/acpi/wakealarm/wakealarm.c
> @@ -25,7 +25,7 @@
>  #include <unistd.h>
>  #include <string.h>
>
> -static char *wkalarm = WAKEALARM;
> +static const char *wkalarm = WAKEALARM;
>
>  static int wakealarm_test1(fwts_framework *fw)
>  {
> @@ -96,7 +96,7 @@ static int wakealarm_test4(fwts_framework *fw)
>         int i;
>         int failed = 0;
>
> -       for (i=1; i<5; i++) {
> +       for (i = 1; i < 5; i++) {
>                 fwts_log_info(fw, "Trigger wakealarm for %d seconds in the future.", i);
>                 int ret = fwts_wakealarm_test_firing(fw, i);
>                 if (ret < 0) {
> --
> 1.8.1.2
>

Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - June 4, 2013, 7:14 a.m.
On 06/03/2013 05:15 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> constify wkalarm, minor re-formatting to the for statement.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/wakealarm/wakealarm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/wakealarm/wakealarm.c b/src/acpi/wakealarm/wakealarm.c
> index b9736ca..7f4886a 100644
> --- a/src/acpi/wakealarm/wakealarm.c
> +++ b/src/acpi/wakealarm/wakealarm.c
> @@ -25,7 +25,7 @@
>   #include <unistd.h>
>   #include <string.h>
>
> -static char *wkalarm = WAKEALARM;
> +static const char *wkalarm = WAKEALARM;
>
>   static int wakealarm_test1(fwts_framework *fw)
>   {
> @@ -96,7 +96,7 @@ static int wakealarm_test4(fwts_framework *fw)
>   	int i;
>   	int failed = 0;
>
> -	for (i=1; i<5; i++) {
> +	for (i = 1; i < 5; i++) {
>   		fwts_log_info(fw, "Trigger wakealarm for %d seconds in the future.", i);
>   		int ret = fwts_wakealarm_test_firing(fw, i);
>   		if (ret < 0) {
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/acpi/wakealarm/wakealarm.c b/src/acpi/wakealarm/wakealarm.c
index b9736ca..7f4886a 100644
--- a/src/acpi/wakealarm/wakealarm.c
+++ b/src/acpi/wakealarm/wakealarm.c
@@ -25,7 +25,7 @@ 
 #include <unistd.h>
 #include <string.h>
 
-static char *wkalarm = WAKEALARM;
+static const char *wkalarm = WAKEALARM;
 
 static int wakealarm_test1(fwts_framework *fw)
 {
@@ -96,7 +96,7 @@  static int wakealarm_test4(fwts_framework *fw)
 	int i;
 	int failed = 0;
 
-	for (i=1; i<5; i++) {
+	for (i = 1; i < 5; i++) {
 		fwts_log_info(fw, "Trigger wakealarm for %d seconds in the future.", i);
 		int ret = fwts_wakealarm_test_firing(fw, i);
 		if (ret < 0) {