linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: swap: fix build warning when CONFIG_SWAP is not set
@ 2025-02-26 18:25 Kemeng Shi
  2025-02-26 15:35 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Kemeng Shi @ 2025-02-26 18:25 UTC (permalink / raw)
  To: akpm, kasong; +Cc: linux-mm, linux-kernel

Fix build warning that folio_alloc_swap is defined but not used when
CONFIG_SWAP is not set.

Fixes: b79768ab943cf ("mm, swap: simplify folio swap allocation")
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
 include/linux/swap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 3a68da686c4e..d1f5414ea537 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -587,7 +587,7 @@ static inline int swp_swapcount(swp_entry_t entry)
 	return 0;
 }
 
-static int folio_alloc_swap(struct folio *folio, gfp_t gfp_mask)
+static inline int folio_alloc_swap(struct folio *folio, gfp_t gfp_mask)
 {
 	return -EINVAL;
 }
-- 
2.30.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-26 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-26 18:25 [PATCH] mm: swap: fix build warning when CONFIG_SWAP is not set Kemeng Shi
2025-02-26 15:35 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox