Patchwork lib: fwts_acpi: constify fwts_acpi_fadt_preferred_pm_profile

login
register
mail settings
Submitter Colin King
Date Dec. 4, 2013, 1:58 p.m.
Message ID <1386165486-21971-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/296517/
State Accepted
Headers show

Comments

Colin King - Dec. 4, 2013, 1:58 p.m.
From: Colin Ian King <colin.king@canonical.com>

Table fwts_acpi_fadt_preferred_pm_profile should probably const

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/include/fwts_acpi.h | 2 +-
 src/lib/src/fwts_acpi.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Ivan Hu - Dec. 9, 2013, 2:28 a.m.
On 12/04/2013 09:58 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Table fwts_acpi_fadt_preferred_pm_profile should probably const
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/include/fwts_acpi.h | 2 +-
>   src/lib/src/fwts_acpi.c     | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
> index fc974b2..d466d32 100644
> --- a/src/lib/include/fwts_acpi.h
> +++ b/src/lib/include/fwts_acpi.h
> @@ -42,7 +42,7 @@
>   #include "fwts_framework.h"
>   #include "fwts_log.h"
>
> -extern char *fwts_acpi_fadt_preferred_pm_profile[];
> +extern const char *fwts_acpi_fadt_preferred_pm_profile[];
>
>   #define FWTS_ACPI_FADT_PREFERRED_PM_PROFILE(x)		\
>   	((x) > 8) ? "Reserved" : fwts_acpi_fadt_preferred_pm_profile[x]
> diff --git a/src/lib/src/fwts_acpi.c b/src/lib/src/fwts_acpi.c
> index c9948b4..de5ed6c 100644
> --- a/src/lib/src/fwts_acpi.c
> +++ b/src/lib/src/fwts_acpi.c
> @@ -28,7 +28,7 @@
>
>   #include "fwts.h"
>
> -char *fwts_acpi_fadt_preferred_pm_profile[] = {
> +const char *fwts_acpi_fadt_preferred_pm_profile[] = {
>   	"Unspecified",
>   	"Desktop",
>   	"Mobile",
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
Alex Hung - Dec. 9, 2013, 3:49 a.m.
On 12/04/2013 09:58 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Table fwts_acpi_fadt_preferred_pm_profile should probably const
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/include/fwts_acpi.h | 2 +-
>  src/lib/src/fwts_acpi.c     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
> index fc974b2..d466d32 100644
> --- a/src/lib/include/fwts_acpi.h
> +++ b/src/lib/include/fwts_acpi.h
> @@ -42,7 +42,7 @@
>  #include "fwts_framework.h"
>  #include "fwts_log.h"
>  
> -extern char *fwts_acpi_fadt_preferred_pm_profile[];
> +extern const char *fwts_acpi_fadt_preferred_pm_profile[];
>  
>  #define FWTS_ACPI_FADT_PREFERRED_PM_PROFILE(x)		\
>  	((x) > 8) ? "Reserved" : fwts_acpi_fadt_preferred_pm_profile[x]
> diff --git a/src/lib/src/fwts_acpi.c b/src/lib/src/fwts_acpi.c
> index c9948b4..de5ed6c 100644
> --- a/src/lib/src/fwts_acpi.c
> +++ b/src/lib/src/fwts_acpi.c
> @@ -28,7 +28,7 @@
>  
>  #include "fwts.h"
>  
> -char *fwts_acpi_fadt_preferred_pm_profile[] = {
> +const char *fwts_acpi_fadt_preferred_pm_profile[] = {
>  	"Unspecified",
>  	"Desktop",
>  	"Mobile",
> 


Acked-by: Alex Hung <alex.hung@canonical.com>

Patch

diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index fc974b2..d466d32 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -42,7 +42,7 @@ 
 #include "fwts_framework.h"
 #include "fwts_log.h"
 
-extern char *fwts_acpi_fadt_preferred_pm_profile[];
+extern const char *fwts_acpi_fadt_preferred_pm_profile[];
 
 #define FWTS_ACPI_FADT_PREFERRED_PM_PROFILE(x)		\
 	((x) > 8) ? "Reserved" : fwts_acpi_fadt_preferred_pm_profile[x]
diff --git a/src/lib/src/fwts_acpi.c b/src/lib/src/fwts_acpi.c
index c9948b4..de5ed6c 100644
--- a/src/lib/src/fwts_acpi.c
+++ b/src/lib/src/fwts_acpi.c
@@ -28,7 +28,7 @@ 
 
 #include "fwts.h"
 
-char *fwts_acpi_fadt_preferred_pm_profile[] = {
+const char *fwts_acpi_fadt_preferred_pm_profile[] = {
 	"Unspecified",
 	"Desktop",
 	"Mobile",