diff mbox series

certs: include prototype for load_certificate_list

Message ID 20210204033208.1389901-1-eric.snowberg@oracle.com (mailing list archive)
State New
Headers show
Series certs: include prototype for load_certificate_list | expand

Commit Message

Eric Snowberg Feb. 4, 2021, 3:32 a.m. UTC
The build test robot reports the following when building
with -Wmissing-prototypes

  int load_certificate_list(const u8 cert_list[],
      ^
  certs/common.c:6:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  int load_certificate_list(const u8 cert_list[],
  ^
 static
  1 warning generated.

Fix the warning by including the header file.

Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Reported-by: kernel test robot <lkp@intel.com>
---
 certs/common.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jarkko Sakkinen Feb. 4, 2021, 2:54 p.m. UTC | #1
On Wed, Feb 03, 2021 at 10:32:08PM -0500, Eric Snowberg wrote:
> The build test robot reports the following when building
> with -Wmissing-prototypes
> 
>   int load_certificate_list(const u8 cert_list[],
>       ^
>   certs/common.c:6:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>   int load_certificate_list(const u8 cert_list[],
>   ^
>  static
>   1 warning generated.
> 
> Fix the warning by including the header file.
> 
> Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
> Reported-by: kernel test robot <lkp@intel.com>


Acked-by: Jarkko Sakkinen <jarkko@kernel.org>

BTW, should the bot have reported-by tagged?

/Jarkko

> ---
>  certs/common.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/certs/common.c b/certs/common.c
> index 83800f51a1a1..16a220887a53 100644
> --- a/certs/common.c
> +++ b/certs/common.c
> @@ -2,6 +2,7 @@
>  
>  #include <linux/kernel.h>
>  #include <linux/key.h>
> +#include "common.h"
>  
>  int load_certificate_list(const u8 cert_list[],
>  			  const unsigned long list_size,
> -- 
> 2.18.4
> 
>
diff mbox series

Patch

diff --git a/certs/common.c b/certs/common.c
index 83800f51a1a1..16a220887a53 100644
--- a/certs/common.c
+++ b/certs/common.c
@@ -2,6 +2,7 @@ 
 
 #include <linux/kernel.h>
 #include <linux/key.h>
+#include "common.h"
 
 int load_certificate_list(const u8 cert_list[],
 			  const unsigned long list_size,