* [PATCH] mm: swap: make pointer swap_avail_heads static
@ 2018-02-06 21:58 Colin King
2018-02-07 0:38 ` Huang, Ying
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-02-06 21:58 UTC (permalink / raw)
To: Andrew Morton, Huang Ying, linux-mm; +Cc: kernel-janitors
From: Colin Ian King <colin.king@canonical.com>
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?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
mm/swapfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 006047b16814..0d00471af98b 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -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];
--
2.15.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: swap: make pointer swap_avail_heads static
2018-02-06 21:58 [PATCH] mm: swap: make pointer swap_avail_heads static Colin King
@ 2018-02-07 0:38 ` Huang, Ying
0 siblings, 0 replies; 2+ messages in thread
From: Huang, Ying @ 2018-02-07 0:38 UTC (permalink / raw)
To: Colin King; +Cc: Andrew Morton, linux-mm, kernel-janitors
Colin King <colin.king@canonical.com> writes:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: "Huang, Ying" <ying.huang@intel.com>
Best Regards,
Huang, Ying
> ---
> mm/swapfile.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/swapfile.c b/mm/swapfile.c
> index 006047b16814..0d00471af98b 100644
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -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];
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-07 0:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06 21:58 [PATCH] mm: swap: make pointer swap_avail_heads static Colin King
2018-02-07 0:38 ` Huang, Ying
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox