Skip to content

Commit 8f14a96

Browse files
arndbakpm00
authored andcommitted
mm: page_poison: always declare __kernel_map_pages() function
The __kernel_map_pages() function is mainly used for CONFIG_DEBUG_PAGEALLOC, but has a number of architecture specific definitions that may also be used in other configurations, as well as a global fallback definition for architectures that do not support DEBUG_PAGEALLOC. When the option is disabled, any definitions without the prototype cause a warning: mm/page_poison.c:102:6: error: no previous prototype for '__kernel_map_pages' [-Werror=missing-prototypes] The function is a trivial nop here, so just declare it anyway to avoid the warning. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Dennis Zhou <[email protected]> Cc: Eric Paris <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Helge Deller <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Simek <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Moore <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Russell King <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Waiman Long <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 6ca0f81 commit 8f14a96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/linux/mm.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3453,13 +3453,12 @@ static inline bool debug_pagealloc_enabled_static(void)
34533453
return static_branch_unlikely(&_debug_pagealloc_enabled);
34543454
}
34553455

3456-
#ifdef CONFIG_DEBUG_PAGEALLOC
34573456
/*
34583457
* To support DEBUG_PAGEALLOC architecture must ensure that
34593458
* __kernel_map_pages() never fails
34603459
*/
34613460
extern void __kernel_map_pages(struct page *page, int numpages, int enable);
3462-
3461+
#ifdef CONFIG_DEBUG_PAGEALLOC
34633462
static inline void debug_pagealloc_map_pages(struct page *page, int numpages)
34643463
{
34653464
if (debug_pagealloc_enabled_static())

0 commit comments

Comments
 (0)