[19/27] acpi: wmi: add in missing const to fix build warnings
diff mbox series

Message ID 20180815131129.24146-20-colin.king@canonical.com
State Accepted
Headers show
Series
  • [01/27] lib: fwts_framework: ensure src pointer is const
Related show

Commit Message

Colin King Aug. 15, 2018, 1:11 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Add in missing const, cleans up warnings.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/wmi/wmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Hung Aug. 15, 2018, 6:11 p.m. UTC | #1
On 2018-08-15 06:11 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Add in missing const, cleans up warnings.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/wmi/wmi.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c
> index 1bdd7975..0a5bbacb 100644
> --- a/src/acpi/wmi/wmi.c
> +++ b/src/acpi/wmi/wmi.c
> @@ -299,12 +299,12 @@ static void wmi_parse_wdg_data(
>   	const uint8_t *wdg_data)
>   {
>   	size_t i;
> -	fwts_wdg_info *info = (fwts_wdg_info *)wdg_data;
> +	const fwts_wdg_info *info = (const fwts_wdg_info *)wdg_data;
>   	bool all_events_known = true;
>   	bool events = false;
>   
>   	for (i = 0; i < (size / sizeof(fwts_wdg_info)); i++, info++) {
> -		uint8_t *guid = info->guid;
> +		const uint8_t *guid = info->guid;
>   		char guid_str[37];
>   		const fwts_wmi_known_guid *known;
>   
> 



Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Aug. 16, 2018, 9:18 a.m. UTC | #2
On 08/15/2018 09:11 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Add in missing const, cleans up warnings.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/wmi/wmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c
> index 1bdd7975..0a5bbacb 100644
> --- a/src/acpi/wmi/wmi.c
> +++ b/src/acpi/wmi/wmi.c
> @@ -299,12 +299,12 @@ static void wmi_parse_wdg_data(
>  	const uint8_t *wdg_data)
>  {
>  	size_t i;
> -	fwts_wdg_info *info = (fwts_wdg_info *)wdg_data;
> +	const fwts_wdg_info *info = (const fwts_wdg_info *)wdg_data;
>  	bool all_events_known = true;
>  	bool events = false;
>  
>  	for (i = 0; i < (size / sizeof(fwts_wdg_info)); i++, info++) {
> -		uint8_t *guid = info->guid;
> +		const uint8_t *guid = info->guid;
>  		char guid_str[37];
>  		const fwts_wmi_known_guid *known;
>  

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

Patch
diff mbox series

diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c
index 1bdd7975..0a5bbacb 100644
--- a/src/acpi/wmi/wmi.c
+++ b/src/acpi/wmi/wmi.c
@@ -299,12 +299,12 @@  static void wmi_parse_wdg_data(
 	const uint8_t *wdg_data)
 {
 	size_t i;
-	fwts_wdg_info *info = (fwts_wdg_info *)wdg_data;
+	const fwts_wdg_info *info = (const fwts_wdg_info *)wdg_data;
 	bool all_events_known = true;
 	bool events = false;
 
 	for (i = 0; i < (size / sizeof(fwts_wdg_info)); i++, info++) {
-		uint8_t *guid = info->guid;
+		const uint8_t *guid = info->guid;
 		char guid_str[37];
 		const fwts_wmi_known_guid *known;