diff mbox series

[21/27] bios: mtrr make function multi_types_check static

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

Commit Message

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

Function multi_types_check is local to the source and does not
need to be in the global namespace so make it static. Also remove
redundant voidification of function return.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/bios/mtrr/mtrr.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>
> 
> Function multi_types_check is local to the source and does not
> need to be in the global namespace so make it static. Also remove
> redundant voidification of function return.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/bios/mtrr/mtrr.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index ecd6204e..5dfb4a60 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -360,7 +360,7 @@ static int guess_cache_type(
>   	return FWTS_OK;
>   }
>   
> -void multi_types_check(fwts_framework *fw, int *type)
> +static void multi_types_check(fwts_framework *fw, int *type)
>   {
>   	int n_types = 0, i;
>   
> @@ -463,7 +463,7 @@ static int validate_iomem(fwts_framework *fw)
>   
>   		type = cache_types(start, end);
>   
> -		(void)multi_types_check(fw, &type);
> +		multi_types_check(fw, &type);
>   
>   		if (guess_cache_type(fw, c2, &type_must, &type_mustnot, start) != FWTS_OK) {
>   			/*  This has failed, give up at this point */
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Aug. 16, 2018, 9:19 a.m. UTC | #2
On 08/15/2018 09:11 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Function multi_types_check is local to the source and does not
> need to be in the global namespace so make it static. Also remove
> redundant voidification of function return.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/bios/mtrr/mtrr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index ecd6204e..5dfb4a60 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -360,7 +360,7 @@ static int guess_cache_type(
>  	return FWTS_OK;
>  }
>  
> -void multi_types_check(fwts_framework *fw, int *type)
> +static void multi_types_check(fwts_framework *fw, int *type)
>  {
>  	int n_types = 0, i;
>  
> @@ -463,7 +463,7 @@ static int validate_iomem(fwts_framework *fw)
>  
>  		type = cache_types(start, end);
>  
> -		(void)multi_types_check(fw, &type);
> +		multi_types_check(fw, &type);
>  
>  		if (guess_cache_type(fw, c2, &type_must, &type_mustnot, start) != FWTS_OK) {
>  			/*  This has failed, give up at this point */

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

Patch

diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
index ecd6204e..5dfb4a60 100644
--- a/src/bios/mtrr/mtrr.c
+++ b/src/bios/mtrr/mtrr.c
@@ -360,7 +360,7 @@  static int guess_cache_type(
 	return FWTS_OK;
 }
 
-void multi_types_check(fwts_framework *fw, int *type)
+static void multi_types_check(fwts_framework *fw, int *type)
 {
 	int n_types = 0, i;
 
@@ -463,7 +463,7 @@  static int validate_iomem(fwts_framework *fw)
 
 		type = cache_types(start, end);
 
-		(void)multi_types_check(fw, &type);
+		multi_types_check(fw, &type);
 
 		if (guess_cache_type(fw, c2, &type_must, &type_mustnot, start) != FWTS_OK) {
 			/*  This has failed, give up at this point */