mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
userspace: fixing warnings in NVGPU-RM SWVS
- Below are warnings encountered when we use same function names in multiple units doxygenfunction: Unable to resolve multiple matches for function “test_setup_env” with arguments () in doxygen xml output. doxygenfunction: Unable to resolve multiple matches for function “test_free_env” with arguments () in doxygen xml output. - Fixing warnings by updating functions with unique names in multiple units JIRA NVGPU-7115 Change-Id: Iaa861040208e101c114f5c556096deb09d08b7fe Signed-off-by: srajum <srajum@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2601798 (cherry picked from commit f57e408ba2fae4ff9b7c54a441e5cc3e75b0c87c) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2678347 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Shashank Singh <shashsingh@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
f6fd0af5ed
commit
2316f39f77
@@ -279,7 +279,7 @@ test_gv11b_gpu_phys_addr.gpu_phys_addr_s2=0
|
||||
[init]
|
||||
test_can_busy.init_can_busy=0
|
||||
test_check_gpu_state.init_check_gpu_state=2
|
||||
test_free_env.init_free_env=0
|
||||
init_test_free_env.init_free_env=0
|
||||
test_get_litter_value.get_litter_value=0
|
||||
test_get_put.init_get_put=0
|
||||
test_hal_init.init_hal_init=0
|
||||
@@ -287,7 +287,7 @@ test_poweroff.init_poweroff=2
|
||||
test_poweron.init_poweron=2
|
||||
test_poweron_branches.init_poweron_branches=2
|
||||
test_quiesce.init_quiesce=2
|
||||
test_setup_env.init_setup_env=0
|
||||
init_test_setup_env.init_setup_env=0
|
||||
|
||||
[interface_kref]
|
||||
test_kref_get.kref_get=0
|
||||
@@ -1000,10 +1000,10 @@ test_priv_ring_setup.priv_ring_setup=0
|
||||
test_set_ppriv_timeout_settings.priv_ring_set_ppriv_timeout_settings=0
|
||||
|
||||
[ptimer]
|
||||
test_free_env.ptimer_free_env=0
|
||||
ptimer_test_free_env.ptimer_free_env=0
|
||||
test_ptimer_isr.ptimer_isr=0
|
||||
test_ptimer_scaling.ptimer_scaling=0
|
||||
test_setup_env.ptimer_setup_env=0
|
||||
ptimer_test_setup_env.ptimer_setup_env=0
|
||||
|
||||
[ramin_gk20a_fusa]
|
||||
test_gk20a_ramin_alloc_size.alloc_size=0
|
||||
@@ -1029,8 +1029,8 @@ test_memcpy_memcmp.memcpy_memcmp=0
|
||||
test_strnadd_u32.strnadd_u32=0
|
||||
|
||||
[therm]
|
||||
test_free_env.therm_free_env=0
|
||||
test_setup_env.therm_setup_env=0
|
||||
therm_test_free_env.therm_free_env=0
|
||||
therm_test_setup_env.therm_setup_env=0
|
||||
test_therm_init_support.therm_init_support=0
|
||||
test_therm_init_elcg_mode.gv11b_therm_init_elcg_mode=0
|
||||
test_elcg_init_idle_filters.gv11b_elcg_init_idle_filters=0
|
||||
|
||||
@@ -95,13 +95,13 @@ static void no_return_u32_param(struct gk20a *g, u32 dummy)
|
||||
/* no op */
|
||||
}
|
||||
|
||||
int test_setup_env(struct unit_module *m,
|
||||
int init_test_setup_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
return UNIT_SUCCESS;
|
||||
}
|
||||
|
||||
int test_free_env(struct unit_module *m,
|
||||
int init_test_free_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
/* Clean up quiesce thread */
|
||||
@@ -809,7 +809,7 @@ int test_quiesce(struct unit_module *m, struct gk20a *g, void *args)
|
||||
}
|
||||
|
||||
struct unit_module_test init_tests[] = {
|
||||
UNIT_TEST(init_setup_env, test_setup_env, NULL, 0),
|
||||
UNIT_TEST(init_setup_env, init_test_setup_env, NULL, 0),
|
||||
UNIT_TEST(get_litter_value, test_get_litter_value, NULL, 0),
|
||||
UNIT_TEST(init_can_busy, test_can_busy, NULL, 0),
|
||||
UNIT_TEST(init_get_put, test_get_put, NULL, 0),
|
||||
@@ -819,7 +819,7 @@ struct unit_module_test init_tests[] = {
|
||||
UNIT_TEST(init_poweroff, test_poweroff, NULL, 2),
|
||||
UNIT_TEST(init_check_gpu_state, test_check_gpu_state, NULL, 2),
|
||||
UNIT_TEST(init_quiesce, test_quiesce, NULL, 2),
|
||||
UNIT_TEST(init_free_env, test_free_env, NULL, 0),
|
||||
UNIT_TEST(init_free_env, init_test_free_env, NULL, 0),
|
||||
};
|
||||
|
||||
UNIT_MODULE(init, init_tests, UNIT_PRIO_NVGPU_TEST);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -33,7 +33,7 @@ struct unit_module;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test specification for: test_setup_env
|
||||
* Test specification for: init_test_setup_env
|
||||
*
|
||||
* Description: Do basic setup before starting other tests.
|
||||
*
|
||||
@@ -48,13 +48,13 @@ struct unit_module;
|
||||
* - UNIT_FAIL if encounters an error creating reg space
|
||||
* - UNIT_SUCCESS otherwise
|
||||
*/
|
||||
int test_setup_env(struct unit_module *m,
|
||||
int init_test_setup_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args);
|
||||
|
||||
/**
|
||||
* Test specification for: test_free_env
|
||||
* Test specification for: init_test_free_env
|
||||
*
|
||||
* Description: Cleanup resources allocated in test_setup_env()
|
||||
* Description: Cleanup resources allocated in init_test_setup_env()
|
||||
*
|
||||
* Test Type: Other (setup)
|
||||
*
|
||||
@@ -66,7 +66,7 @@ int test_setup_env(struct unit_module *m,
|
||||
* Output:
|
||||
* - UNIT_SUCCESS always
|
||||
*/
|
||||
int test_free_env(struct unit_module *m,
|
||||
int init_test_free_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args);
|
||||
|
||||
/**
|
||||
@@ -125,7 +125,7 @@ int test_can_busy(struct unit_module *m,
|
||||
* Targets: nvgpu_get, nvgpu_put
|
||||
*
|
||||
* Input:
|
||||
* - test_setup_env() must be called before.
|
||||
* - init_test_setup_env() must be called before.
|
||||
*
|
||||
* Steps:
|
||||
* - Initialize refcount.
|
||||
@@ -155,7 +155,7 @@ int test_get_put(struct unit_module *m,
|
||||
* Test Type: Feature
|
||||
*
|
||||
* Input:
|
||||
* - test_setup_env() must be called before.
|
||||
* - init_test_setup_env() must be called before.
|
||||
*
|
||||
* Targets: nvgpu_check_gpu_state, is_nvgpu_gpu_state_valid,
|
||||
* gops_mc.get_chip_details
|
||||
@@ -188,7 +188,7 @@ int test_check_gpu_state(struct unit_module *m,
|
||||
* Targets: nvgpu_detect_chip
|
||||
*
|
||||
* Input:
|
||||
* - test_setup_env() must be called before.
|
||||
* - init_test_setup_env() must be called before.
|
||||
*
|
||||
* Steps:
|
||||
* - Nominal test
|
||||
@@ -228,7 +228,7 @@ int test_hal_init(struct unit_module *m,
|
||||
* Targets: nvgpu_finalize_poweron, nvgpu_init_gpu_characteristics
|
||||
*
|
||||
* Input:
|
||||
* - test_setup_env() must be called before.
|
||||
* - init_test_setup_env() must be called before.
|
||||
*
|
||||
* Steps:
|
||||
* 1) Setup poweron init function pointers.
|
||||
@@ -256,7 +256,7 @@ int test_poweron(struct unit_module *m, struct gk20a *g, void *args);
|
||||
* Targets: nvgpu_finalize_poweron
|
||||
*
|
||||
* Input:
|
||||
* - test_setup_env() must be called before.
|
||||
* - init_test_setup_env() must be called before.
|
||||
*
|
||||
* Steps:
|
||||
* 1) Setup poweron init function pointers to NULL and enable flags.
|
||||
@@ -281,7 +281,7 @@ int test_poweron_branches(struct unit_module *m, struct gk20a *g, void *args);
|
||||
* Targets: nvgpu_prepare_poweroff
|
||||
*
|
||||
* Input:
|
||||
* - test_setup_env() must be called before.
|
||||
* - init_test_setup_env() must be called before.
|
||||
*
|
||||
* Steps:
|
||||
* 1) Setup poweroff init function pointers.
|
||||
@@ -311,7 +311,7 @@ int test_poweroff(struct unit_module *m, struct gk20a *g, void *args);
|
||||
* nvgpu_bug_exit
|
||||
*
|
||||
* Input:
|
||||
* - test_setup_env() must be called before.
|
||||
* - init_test_setup_env() must be called before.
|
||||
*
|
||||
* Steps:
|
||||
* - Use stub for g->ops.mc.intr_mask, g->ops.runlist.write_state and
|
||||
|
||||
@@ -83,7 +83,7 @@ static struct nvgpu_posix_io_callbacks test_reg_callbacks = {
|
||||
#define PTIMER_REG_SPACE_START (timer_pri_timeout_r() & ~0xfff)
|
||||
#define PTIMER_REG_SPACE_SIZE 0xfff
|
||||
|
||||
int test_setup_env(struct unit_module *m,
|
||||
int ptimer_test_setup_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
/* Setup HAL */
|
||||
@@ -115,7 +115,7 @@ int test_setup_env(struct unit_module *m,
|
||||
return UNIT_SUCCESS;
|
||||
}
|
||||
|
||||
int test_free_env(struct unit_module *m,
|
||||
int ptimer_test_free_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
/* Free register space */
|
||||
@@ -250,10 +250,10 @@ int test_ptimer_scaling(struct unit_module *m,
|
||||
}
|
||||
|
||||
struct unit_module_test ptimer_tests[] = {
|
||||
UNIT_TEST(ptimer_setup_env, test_setup_env, NULL, 0),
|
||||
UNIT_TEST(ptimer_setup_env, ptimer_test_setup_env, NULL, 0),
|
||||
UNIT_TEST(ptimer_isr, test_ptimer_isr, NULL, 0),
|
||||
UNIT_TEST(ptimer_scaling, test_ptimer_scaling, NULL, 0),
|
||||
UNIT_TEST(ptimer_free_env, test_free_env, NULL, 0),
|
||||
UNIT_TEST(ptimer_free_env, ptimer_test_free_env, NULL, 0),
|
||||
};
|
||||
|
||||
UNIT_MODULE(ptimer, ptimer_tests, UNIT_PRIO_NVGPU_TEST);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -33,7 +33,7 @@ struct unit_module;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test specification for: test_setup_env
|
||||
* Test specification for: ptimer_test_setup_env
|
||||
*
|
||||
* Description: Setup prerequisites for tests.
|
||||
*
|
||||
@@ -49,17 +49,17 @@ struct unit_module;
|
||||
* - UNIT_FAIL if encounters an error creating reg space
|
||||
* - UNIT_SUCCESS otherwise
|
||||
*/
|
||||
int test_setup_env(struct unit_module *m,
|
||||
int ptimer_test_setup_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args);
|
||||
|
||||
/**
|
||||
* Test specification for: test_free_env
|
||||
* Test specification for: ptimer_test_free_env
|
||||
*
|
||||
* Description: Release resources from test_setup_env()
|
||||
* Description: Release resources from ptimer_test_setup_env()
|
||||
*
|
||||
* Test Type: Other (setup)
|
||||
*
|
||||
* Input: test_setup_env() has been executed.
|
||||
* Input: ptimer_test_setup_env() has been executed.
|
||||
*
|
||||
* Steps:
|
||||
* - Delete ptimer register space from mockio.
|
||||
@@ -68,7 +68,7 @@ int test_setup_env(struct unit_module *m,
|
||||
* - UNIT_FAIL if encounters an error creating reg space
|
||||
* - UNIT_SUCCESS otherwise
|
||||
*/
|
||||
int test_free_env(struct unit_module *m,
|
||||
int ptimer_test_free_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args);
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -75,7 +75,7 @@ static int mock_hal_fail(struct gk20a *g)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int test_setup_env(struct unit_module *m,
|
||||
int therm_test_setup_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
/* Create therm register space */
|
||||
@@ -90,7 +90,7 @@ int test_setup_env(struct unit_module *m,
|
||||
return UNIT_SUCCESS;
|
||||
}
|
||||
|
||||
int test_free_env(struct unit_module *m, struct gk20a *g, void *args)
|
||||
int therm_test_free_env(struct unit_module *m, struct gk20a *g, void *args)
|
||||
{
|
||||
nvgpu_posix_io_delete_reg_space(g, THERM_ADDR_SPACE_START);
|
||||
|
||||
@@ -132,11 +132,11 @@ done:
|
||||
}
|
||||
|
||||
struct unit_module_test therm_tests[] = {
|
||||
UNIT_TEST(therm_setup_env, test_setup_env, NULL, 0),
|
||||
UNIT_TEST(therm_setup_env, therm_test_setup_env, NULL, 0),
|
||||
UNIT_TEST(therm_init_support, test_therm_init_support, NULL, 0),
|
||||
UNIT_TEST(gv11b_therm_init_elcg_mode, test_therm_init_elcg_mode, NULL, 0),
|
||||
UNIT_TEST(gv11b_elcg_init_idle_filters, test_elcg_init_idle_filters, NULL, 0),
|
||||
UNIT_TEST(therm_free_env, test_free_env, NULL, 0),
|
||||
UNIT_TEST(therm_free_env, therm_test_free_env, NULL, 0),
|
||||
};
|
||||
|
||||
UNIT_MODULE(therm, therm_tests, UNIT_PRIO_NVGPU_TEST);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -33,7 +33,7 @@ struct unit_module;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test specification for: test_setup_env
|
||||
* Test specification for: therm_test_setup_env
|
||||
*
|
||||
* Description: Do basic setup before starting other tests.
|
||||
*
|
||||
@@ -49,24 +49,24 @@ struct unit_module;
|
||||
* - UNIT_FAIL if encounters an error creating reg space
|
||||
* - UNIT_SUCCESS otherwise
|
||||
*/
|
||||
int test_setup_env(struct unit_module *m,
|
||||
int therm_test_setup_env(struct unit_module *m,
|
||||
struct gk20a *g, void *args);
|
||||
|
||||
/**
|
||||
* Test specification for: test_free_env
|
||||
* Test specification for: therm_test_free_env
|
||||
*
|
||||
* Description: Cleanup resources allocated in test_setup_env
|
||||
* Description: Cleanup resources allocated in therm_test_setup_env
|
||||
*
|
||||
* Test Type: Other (setup)
|
||||
*
|
||||
* Input: test_setup_env has run.
|
||||
* Input: therm_test_setup_env has run.
|
||||
*
|
||||
* Steps:
|
||||
* - Free reg spaces.
|
||||
*
|
||||
* Output: UNIT_SUCCESS always.
|
||||
*/
|
||||
int test_free_env(struct unit_module *m, struct gk20a *g, void *args);
|
||||
int therm_test_free_env(struct unit_module *m, struct gk20a *g, void *args);
|
||||
|
||||
/**
|
||||
* Test specification for: test_therm_init_support
|
||||
@@ -78,7 +78,7 @@ int test_free_env(struct unit_module *m, struct gk20a *g, void *args);
|
||||
* Targets: gops_therm.init_therm_support, gops_therm.init_therm_setup_hw,
|
||||
* nvgpu_init_therm_support, gv11b_init_therm_setup_hw
|
||||
*
|
||||
* Input: test_setup_env has run.
|
||||
* Input: therm_test_setup_env has run.
|
||||
*
|
||||
* Steps:
|
||||
* - Call API gops_therm.init_therm_support and verify it returns success.
|
||||
@@ -129,7 +129,7 @@ int test_therm_init_elcg_mode(struct unit_module *m, struct gk20a *g,
|
||||
*
|
||||
* Targets: gops_therm.elcg_init_idle_filters, gv11b_elcg_init_idle_filters
|
||||
*
|
||||
* Input: test_setup_env has run.
|
||||
* Input: therm_test_setup_env has run.
|
||||
*
|
||||
* Steps:
|
||||
* - Setup FIFO in gk20a struct for 2 active engines.
|
||||
|
||||
Reference in New Issue
Block a user