lib/test_debug_virtual.c: make struct pointer foo static
authorColin Ian King <colin.king@canonical.com>
Wed, 22 Aug 2018 04:57:07 +0000 (21:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Aug 2018 17:52:48 +0000 (10:52 -0700)
The pointer foo is local to the source and does not need to be
in global scope, so make it static.

Cleans up sparse warning:
symbol 'foo' was not declared. Should it be static?

Link: http://lkml.kernel.org/r/20180624112206.5722-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/test_debug_virtual.c

index b9cdeec..d5a06ad 100644 (file)
@@ -15,7 +15,7 @@ struct foo {
        unsigned int bar;
 };
 
-struct foo *foo;
+static struct foo *foo;
 
 static int __init test_debug_virtual_init(void)
 {