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 |
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>
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 --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 */