mm/swapfile.c: make pointer swap_avail_heads static
authorColin Ian King <[email protected]>
Tue, 10 Apr 2018 23:29:55 +0000 (16:29 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Apr 2018 17:28:32 +0000 (10:28 -0700)
The pointer swap_avail_heads is local to the source and does not need to
be in global scope, so make it static.

Cleans up sparse warning:

  mm/swapfile.c:88:19: warning: symbol 'swap_avail_heads' was not declared. Should it be static?

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Acked-by: "Huang, Ying" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/swapfile.c

index a134d1e867957fb20bf9ed034f0f7e1effbd8354..cc2cf04d9018ad0c546648dfa6cb8167082bbc99 100644 (file)
@@ -85,7 +85,7 @@ PLIST_HEAD(swap_active_head);
  * is held and the locking order requires swap_lock to be taken
  * before any swap_info_struct->lock.
  */
-struct plist_head *swap_avail_heads;
+static struct plist_head *swap_avail_heads;
 static DEFINE_SPINLOCK(swap_avail_lock);
 
 struct swap_info_struct *swap_info[MAX_SWAPFILES];