mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
ffa550cd69
This addresses the following sparse warning: lib/memregion.c:8:5: warning: symbol 'memregion_alloc' was not declared. Should it be static? lib/memregion.c:14:6: warning: symbol 'memregion_free' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Link: https://lkml.kernel.org/r/20200921142852.875312-1-yanaijie@huawei.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
19 lines
429 B
C
19 lines
429 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/* identifiers for device / performance-differentiated memory regions */
|
|
#include <linux/idr.h>
|
|
#include <linux/types.h>
|
|
#include <linux/memregion.h>
|
|
|
|
static DEFINE_IDA(memregion_ids);
|
|
|
|
int memregion_alloc(gfp_t gfp)
|
|
{
|
|
return ida_alloc(&memregion_ids, gfp);
|
|
}
|
|
EXPORT_SYMBOL(memregion_alloc);
|
|
|
|
void memregion_free(int id)
|
|
{
|
|
ida_free(&memregion_ids, id);
|
|
}
|
|
EXPORT_SYMBOL(memregion_free);
|