From 88e167ad98f0e6084b5b5fae47b8403f50b8612d Mon Sep 17 00:00:00 2001 From: Philip Elcan Date: Mon, 26 Aug 2019 18:01:47 -0400 Subject: [PATCH] gpu: nvgpu: unit: init: cleanup init test header Remove include files and replace with forward declarations. Remove 'static' modifier in header and source. JIRA NVGPU-2239 Change-Id: Ie7b6d34be446a7c9a163179c0fc443275278489a Signed-off-by: Philip Elcan Reviewed-on: https://git-master.nvidia.com/r/2184927 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/units/init/nvgpu-init.c | 12 ++++++------ userspace/units/init/nvgpu-init.h | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/userspace/units/init/nvgpu-init.c b/userspace/units/init/nvgpu-init.c index 4fd71f275..3fd302763 100644 --- a/userspace/units/init/nvgpu-init.c +++ b/userspace/units/init/nvgpu-init.c @@ -79,7 +79,7 @@ static void no_return(struct gk20a *g) /* noop */ } -static int test_setup_env(struct unit_module *m, +int test_setup_env(struct unit_module *m, struct gk20a *g, void *args) { /* Create mc register space */ @@ -100,7 +100,7 @@ static int test_setup_env(struct unit_module *m, return UNIT_SUCCESS; } -static int test_free_env(struct unit_module *m, +int test_free_env(struct unit_module *m, struct gk20a *g, void *args) { /* Free mc register space */ @@ -110,7 +110,7 @@ static int test_free_env(struct unit_module *m, return UNIT_SUCCESS; } -static int test_can_busy(struct unit_module *m, +int test_can_busy(struct unit_module *m, struct gk20a *g, void *args) { int ret = UNIT_SUCCESS; @@ -146,7 +146,7 @@ static int test_can_busy(struct unit_module *m, return ret; } -static int test_get_put(struct unit_module *m, +int test_get_put(struct unit_module *m, struct gk20a *g, void *args) { int ret = UNIT_SUCCESS; @@ -217,7 +217,7 @@ static int test_get_put(struct unit_module *m, return ret; } -static int test_check_gpu_state(struct unit_module *m, +int test_check_gpu_state(struct unit_module *m, struct gk20a *g, void *args) { /* Valid state */ @@ -238,7 +238,7 @@ static int test_check_gpu_state(struct unit_module *m, return UNIT_SUCCESS; } -static int test_hal_init(struct unit_module *m, +int test_hal_init(struct unit_module *m, struct gk20a *g, void *args) { nvgpu_posix_io_writel_reg_space(g, mc_boot_0_r(), MC_BOOT_0_GV11B); diff --git a/userspace/units/init/nvgpu-init.h b/userspace/units/init/nvgpu-init.h index 36baabc1c..4db4f8f15 100644 --- a/userspace/units/init/nvgpu-init.h +++ b/userspace/units/init/nvgpu-init.h @@ -23,8 +23,8 @@ #ifndef UNIT_NVGPU_INIT_H #define UNIT_NVGPU_INIT_H -#include -#include +struct gk20a; +struct unit_module; /** @addtogroup SWUTS-init * @{ @@ -48,7 +48,7 @@ * - UNIT_FAIL if encounters an error creating reg space * - UNIT_SUCCESS otherwise */ -static int test_setup_env(struct unit_module *m, +int test_setup_env(struct unit_module *m, struct gk20a *g, void *args); /** @@ -66,7 +66,7 @@ static int test_setup_env(struct unit_module *m, * Output: * - UNIT_SUCCESS always */ -static int test_free_env(struct unit_module *m, +int test_free_env(struct unit_module *m, struct gk20a *g, void *args); /** @@ -87,7 +87,7 @@ static int test_free_env(struct unit_module *m, * - UNIT_FAIL if nvgpu_can_busy() returns the incorrect value. * - UNIT_SUCCESS otherwise */ -static int test_can_busy(struct unit_module *m, +int test_can_busy(struct unit_module *m, struct gk20a *g, void *args); /** @@ -117,7 +117,7 @@ static int test_can_busy(struct unit_module *m, * incorrect * - UNIT_SUCCESS otherwise */ -static int test_get_put(struct unit_module *m, +int test_get_put(struct unit_module *m, struct gk20a *g, void *args); /** @@ -145,7 +145,7 @@ static int test_get_put(struct unit_module *m, * the test. * - UNIT_SUCCESS otherwise */ -static int test_check_gpu_state(struct unit_module *m, +int test_check_gpu_state(struct unit_module *m, struct gk20a *g, void *args); /** @@ -167,7 +167,7 @@ static int test_check_gpu_state(struct unit_module *m, * - UNIT_FAIL if HAL initialization fails * - UNIT_SUCCESS otherwise */ -static int test_hal_init(struct unit_module *m, +int test_hal_init(struct unit_module *m, struct gk20a *g, void *args);