diff mbox series

[v4,21/22] mm/zsmalloc: fix build warning from lkp testing

Message ID 20240729112534.3416707-22-alexs@kernel.org (mailing list archive)
State New
Headers show
Series mm/zsmalloc: add zpdesc memory descriptor for zswap.zpool | expand

Commit Message

alexs@kernel.org July 29, 2024, 11:25 a.m. UTC
From: Alex Shi <alexs@kernel.org>

LKP reported the following warning w/o CONFIG_DEBUG_VM:
	mm/zsmalloc.c:471:12: warning: function 'is_first_zpdesc' is not
	needed and will not be emitted [-Wunneeded-internal-declaration]
To remove this warning, better to incline the function is_first_zpdesc

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407052102.qbT7nLMK-lkp@intel.com/
Signed-off-by: Alex Shi <alexs@kernel.org>
---
 mm/zsmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vishal Moola (Oracle) Aug. 2, 2024, 7:13 p.m. UTC | #1
On Mon, Jul 29, 2024 at 07:25:33PM +0800, alexs@kernel.org wrote:
> From: Alex Shi <alexs@kernel.org>
> 
> LKP reported the following warning w/o CONFIG_DEBUG_VM:
> 	mm/zsmalloc.c:471:12: warning: function 'is_first_zpdesc' is not
> 	needed and will not be emitted [-Wunneeded-internal-declaration]
> To remove this warning, better to incline the function is_first_zpdesc

In future iterations of the series, just fold this into the patch its
fixing. It makes reviewing easier.
Alex Shi Aug. 5, 2024, 8:38 a.m. UTC | #2
On 8/3/24 3:13 AM, Vishal Moola wrote:
> On Mon, Jul 29, 2024 at 07:25:33PM +0800, alexs@kernel.org wrote:
>> From: Alex Shi <alexs@kernel.org>
>>
>> LKP reported the following warning w/o CONFIG_DEBUG_VM:
>> 	mm/zsmalloc.c:471:12: warning: function 'is_first_zpdesc' is not
>> 	needed and will not be emitted [-Wunneeded-internal-declaration]
>> To remove this warning, better to incline the function is_first_zpdesc
> 
> In future iterations of the series, just fold this into the patch its
> fixing. It makes reviewing easier.
> 

Yes, thanks for comments!
diff mbox series

Patch

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 7f8e02df4e3e..64e523ae71f8 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -468,7 +468,7 @@  static DEFINE_PER_CPU(struct mapping_area, zs_map_area) = {
 	.lock	= INIT_LOCAL_LOCK(lock),
 };
 
-static int is_first_zpdesc(struct zpdesc *zpdesc)
+static inline bool is_first_zpdesc(struct zpdesc *zpdesc)
 {
 	return PagePrivate(zpdesc_page(zpdesc));
 }