mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
lib: test_objpool: make global variables static
Kernel test robot reported build warnings that structures g_ot_sync_ops, g_ot_async_ops and g_testcases should be static. These definitions are only used in test_objpool.c, so make them static Link: https://lore.kernel.org/all/20231108012248.313574-1-wuqiang.matt@bytedance.com/ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202311071229.WGrWUjM1-lkp@intel.com/ Signed-off-by: wuqiang.matt <wuqiang.matt@bytedance.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
This commit is contained in:
parent
b2a866975f
commit
3afe733729
@ -311,7 +311,7 @@ static void ot_fini_sync(struct ot_context *sop)
|
||||
ot_kfree(sop->test, sop, sizeof(*sop));
|
||||
}
|
||||
|
||||
struct {
|
||||
static struct {
|
||||
struct ot_context * (*init)(struct ot_test *oc);
|
||||
void (*fini)(struct ot_context *sop);
|
||||
} g_ot_sync_ops[] = {
|
||||
@ -475,7 +475,7 @@ static struct ot_context *ot_init_async_m0(struct ot_test *test)
|
||||
return sop;
|
||||
}
|
||||
|
||||
struct {
|
||||
static struct {
|
||||
struct ot_context * (*init)(struct ot_test *oc);
|
||||
void (*fini)(struct ot_context *sop);
|
||||
} g_ot_async_ops[] = {
|
||||
@ -632,7 +632,7 @@ static int ot_start_async(struct ot_test *test)
|
||||
#define NODE_COMPACT sizeof(struct ot_node)
|
||||
#define NODE_VMALLOC (512)
|
||||
|
||||
struct ot_test g_testcases[] = {
|
||||
static struct ot_test g_testcases[] = {
|
||||
|
||||
/* sync & normal */
|
||||
{0, 0, NODE_COMPACT, 1000, 0, 1, 0, 0, "sync: percpu objpool"},
|
||||
|
Loading…
Reference in New Issue
Block a user