Skip to content

Commit bfc6b1c

Browse files
Colin Ian Kingtorvalds
authored andcommitted
mm/swapfile.c: make pointer swap_avail_heads static
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/20180206215836.12366-1-colin.king@canonical.com Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: "Huang, Ying" <ying.huang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4eaf431 commit bfc6b1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/swapfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ PLIST_HEAD(swap_active_head);
8585
* is held and the locking order requires swap_lock to be taken
8686
* before any swap_info_struct->lock.
8787
*/
88-
struct plist_head *swap_avail_heads;
88+
static struct plist_head *swap_avail_heads;
8989
static DEFINE_SPINLOCK(swap_avail_lock);
9090

9191
struct swap_info_struct *swap_info[MAX_SWAPFILES];

0 commit comments

Comments
 (0)