Re: [PATCH] mm: swap: make pointer swap_avail_heads static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Colin King <colin.king@xxxxxxxxxxxxx> writes:

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>

Acked-by: "Huang, Ying" <ying.huang@xxxxxxxxx>

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 from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux