summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2022-06-23 13:02:31 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-12 16:35:10 +0200
commit6c9c8a7a9a54bc2e3507e9c0e9e38d62dfb86f50 (patch)
treec8e09a39b4769c4440e4db4577b2c85980c6588f /include
parent79827e53b069276785ed32f34915b7c76055e42c (diff)
downloadlinux-stable-6c9c8a7a9a54bc2e3507e9c0e9e38d62dfb86f50.tar.gz
linux-stable-6c9c8a7a9a54bc2e3507e9c0e9e38d62dfb86f50.tar.bz2
linux-stable-6c9c8a7a9a54bc2e3507e9c0e9e38d62dfb86f50.zip
memregion: Fix memregion_free() fallback definition
commit f50974eee5c4a5de1e4f1a3d873099f170df25f8 upstream. 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: 33dd70752cd7 ("lib: Uplevel the pmem "region" ida to a global allocator") Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://lore.kernel.org/r/165601455171.4042645.3350844271068713515.stgit@dwillia2-xfh Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/memregion.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/memregion.h b/include/linux/memregion.h
index e11595256cac..c04c4fd2e209 100644
--- a/include/linux/memregion.h
+++ b/include/linux/memregion.h
@@ -16,7 +16,7 @@ static inline int memregion_alloc(gfp_t gfp)
{
return -ENOMEM;
}
-void memregion_free(int id)
+static inline void memregion_free(int id)
{
}
#endif