From b3f575074b66e8af1a9943874f9782b793fa7edc Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 4 Nov 2014 18:44:28 +0530 Subject: gpu: nvgpu: fix sparse warnings Fix below sparse warnings : warning: Using plain integer as NULL pointer warning: symbol was not declared. Should it be static? warning: Initializer entry defined twice Also, remove dead functions Bug 1573254 Change-Id: I29d71ecc01c841233cf6b26c9088ca8874773469 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/593363 Reviewed-by: Amit Sharma (SW-TEGRA) Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam --- drivers/gpu/nvgpu/gk20a/regops_gk20a.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/regops_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c index d9984e03..fe444c78 100644 --- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c @@ -577,7 +577,7 @@ static bool check_whitelists(struct dbg_session_gk20a *dbg_s, if (!dbg_s->ch) { gk20a_err(dbg_s->dev, "can't perform ctx regop unless bound"); op->status = REGOP(STATUS_UNSUPPORTED_OP); - return -ENODEV; + return valid; } /* binary search context list */ @@ -697,67 +697,68 @@ bool is_bar0_global_offset_whitelisted_gk20a(struct gk20a *g, u32 offset) return valid; } -const struct regop_offset_range *gk20a_get_global_whitelist_ranges(void) +static const struct regop_offset_range *gk20a_get_global_whitelist_ranges(void) { return gk20a_global_whitelist_ranges; } -int gk20a_get_global_whitelist_ranges_count(void) +static int gk20a_get_global_whitelist_ranges_count(void) { return gk20a_global_whitelist_ranges_count; } -const struct regop_offset_range *gk20a_get_context_whitelist_ranges(void) +static const struct regop_offset_range *gk20a_get_context_whitelist_ranges(void) { return gk20a_context_whitelist_ranges; } -int gk20a_get_context_whitelist_ranges_count(void) +static int gk20a_get_context_whitelist_ranges_count(void) { return gk20a_context_whitelist_ranges_count; } -const u32 *gk20a_get_runcontrol_whitelist(void) +static const u32 *gk20a_get_runcontrol_whitelist(void) { return gk20a_runcontrol_whitelist; } -int gk20a_get_runcontrol_whitelist_count(void) +static int gk20a_get_runcontrol_whitelist_count(void) { return gk20a_runcontrol_whitelist_count; } -const struct regop_offset_range *gk20a_get_runcontrol_whitelist_ranges(void) +static const +struct regop_offset_range *gk20a_get_runcontrol_whitelist_ranges(void) { return gk20a_runcontrol_whitelist_ranges; } -int gk20a_get_runcontrol_whitelist_ranges_count(void) +static int gk20a_get_runcontrol_whitelist_ranges_count(void) { return gk20a_runcontrol_whitelist_ranges_count; } -const u32 *gk20a_get_qctl_whitelist(void) +static const u32 *gk20a_get_qctl_whitelist(void) { return gk20a_qctl_whitelist; } -int gk20a_get_qctl_whitelist_count(void) +static int gk20a_get_qctl_whitelist_count(void) { return gk20a_qctl_whitelist_count; } -const struct regop_offset_range *gk20a_get_qctl_whitelist_ranges(void) +static const struct regop_offset_range *gk20a_get_qctl_whitelist_ranges(void) { return gk20a_qctl_whitelist_ranges; } -int gk20a_get_qctl_whitelist_ranges_count(void) +static int gk20a_get_qctl_whitelist_ranges_count(void) { return gk20a_qctl_whitelist_ranges_count; } -int gk20a_apply_smpc_war(struct dbg_session_gk20a *dbg_s) +static int gk20a_apply_smpc_war(struct dbg_session_gk20a *dbg_s) { /* The following regops are a hack/war to make up for the fact that we * just scribbled into the ctxsw image w/o really knowing whether -- cgit v1.2.2