mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
96fa24eb1a
commitf50974eee5
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:33dd70752c
("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>
23 lines
417 B
C
23 lines
417 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _MEMREGION_H_
|
|
#define _MEMREGION_H_
|
|
#include <linux/types.h>
|
|
#include <linux/errno.h>
|
|
|
|
struct memregion_info {
|
|
int target_node;
|
|
};
|
|
|
|
#ifdef CONFIG_MEMREGION
|
|
int memregion_alloc(gfp_t gfp);
|
|
void memregion_free(int id);
|
|
#else
|
|
static inline int memregion_alloc(gfp_t gfp)
|
|
{
|
|
return -ENOMEM;
|
|
}
|
|
static inline void memregion_free(int id)
|
|
{
|
|
}
|
|
#endif
|
|
#endif /* _MEMREGION_H_ */
|