lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3qr7e7nmith6i4dbffsxvm63wappv4nl4d7nuto4432mpcec3@t74zh4amndir>
Date: Tue, 23 Apr 2024 11:55:49 -0400
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/1] mm: page_alloc: Avoid defining unused function

* Andy Shevchenko <andriy.shevchenko@...ux.intel.com> [240423 11:06]:
> In some configurations I got
> mm/page_alloc.c:656:20: warning: unused function 'add_to_free_list' [-Wunused-function]
> Becuase the only user is guarged with a certain ifdeffery,
> do the same for add_to_free_list().

Why not relocate it within the existing CONFIG_MEMORY_FAILURE block?

> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  mm/page_alloc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 33d4a1be927b..0fb796b700a4 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -653,6 +653,7 @@ static inline void __add_to_free_list(struct page *page, struct zone *zone,
>  	area->nr_free++;
>  }
>  
> +#ifdef CONFIG_MEMORY_FAILURE
>  static inline void add_to_free_list(struct page *page, struct zone *zone,
>  				    unsigned int order, int migratetype,
>  				    bool tail)
> @@ -660,6 +661,7 @@ static inline void add_to_free_list(struct page *page, struct zone *zone,
>  	__add_to_free_list(page, zone, order, migratetype, tail);
>  	account_freepages(zone, 1 << order, migratetype);
>  }
> +#endif
>  
>  /*
>   * Used for pages which are on another list. Move the pages to the tail
> -- 
> 2.43.0.rc1.1336.g36b5255a03ac
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ