[-next] proc/kcore: Make kcore_modules static
diff mbox series

Message ID 20190320135417.13272-1-yuehaibing@huawei.com
State New
Headers show
Series
  • [-next] proc/kcore: Make kcore_modules static
Related show

Commit Message

Yuehaibing March 20, 2019, 1:54 p.m. UTC
From: YueHaibing <yuehaibing@huawei.com>

Fix sparse warning:

fs/proc/kcore.c:591:19: warning:
 symbol 'kcore_modules' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/proc/kcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mukesh Ojha March 20, 2019, 7:55 p.m. UTC | #1
On 3/20/2019 7:24 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fix sparse warning:
>
> fs/proc/kcore.c:591:19: warning:
>   symbol 'kcore_modules' was not declared. Should it be static?
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   fs/proc/kcore.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
> index bbcc185..378f453 100644
> --- a/fs/proc/kcore.c
> +++ b/fs/proc/kcore.c
> @@ -588,7 +588,7 @@ static void __init proc_kcore_text_init(void)
>   /*
>    * MODULES_VADDR has no intersection with VMALLOC_ADDR.
>    */
> -struct kcore_list kcore_modules;
> +static struct kcore_list kcore_modules;
>   static void __init add_modules_range(void)
>   {
>   	if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {


Acked-by: Mukesh Ojha <mojha@codeaurora.org>

Patch
diff mbox series

diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index bbcc185..378f453 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -588,7 +588,7 @@  static void __init proc_kcore_text_init(void)
 /*
  * MODULES_VADDR has no intersection with VMALLOC_ADDR.
  */
-struct kcore_list kcore_modules;
+static struct kcore_list kcore_modules;
 static void __init add_modules_range(void)
 {
 	if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {