Skip to content

Commit f50974e

Browse files
committed
memregion: Fix memregion_free() fallback definition
In the CONFIG_MEMREGION=n case, memregion_free() is meant to be a static inline. 0day reports: In file included from drivers/cxl/core/port.c:4: include/linux/memregion.h:19:6: warning: no previous prototype for function 'memregion_free' [-Wmissing-prototypes] Mark memregion_free() static. Fixes: 33dd707 ("lib: Uplevel the pmem "region" ida to a global allocator") Reported-by: kernel test robot <[email protected]> Reviewed-by: Alison Schofield <[email protected]> Link: https://lore.kernel.org/r/165601455171.4042645.3350844271068713515.stgit@dwillia2-xfh Signed-off-by: Dan Williams <[email protected]>
1 parent 8a66487 commit f50974e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/memregion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static inline int memregion_alloc(gfp_t gfp)
1616
{
1717
return -ENOMEM;
1818
}
19-
void memregion_free(int id)
19+
static inline void memregion_free(int id)
2020
{
2121
}
2222
#endif

0 commit comments

Comments
 (0)