summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/regops_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2014-11-04 08:14:28 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:01 -0400
commitb3f575074b66e8af1a9943874f9782b793fa7edc (patch)
treec4aaa1defc512cf5a896edc25445f169de184ece /drivers/gpu/nvgpu/gk20a/regops_gk20a.c
parent797e4dd319bd2b9e13ce0e44a3bbbb75e4820330 (diff)
gpu: nvgpu: fix sparse warnings
Fix below sparse warnings : warning: Using plain integer as NULL pointer warning: symbol <variable/funcion> 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 <dnibade@nvidia.com> Reviewed-on: http://git-master/r/593363 Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/regops_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/regops_gk20a.c29
1 files changed, 15 insertions, 14 deletions
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,
577 if (!dbg_s->ch) { 577 if (!dbg_s->ch) {
578 gk20a_err(dbg_s->dev, "can't perform ctx regop unless bound"); 578 gk20a_err(dbg_s->dev, "can't perform ctx regop unless bound");
579 op->status = REGOP(STATUS_UNSUPPORTED_OP); 579 op->status = REGOP(STATUS_UNSUPPORTED_OP);
580 return -ENODEV; 580 return valid;
581 } 581 }
582 582
583 /* binary search context list */ 583 /* binary search context list */
@@ -697,67 +697,68 @@ bool is_bar0_global_offset_whitelisted_gk20a(struct gk20a *g, u32 offset)
697 return valid; 697 return valid;
698} 698}
699 699
700const struct regop_offset_range *gk20a_get_global_whitelist_ranges(void) 700static const struct regop_offset_range *gk20a_get_global_whitelist_ranges(void)
701{ 701{
702 return gk20a_global_whitelist_ranges; 702 return gk20a_global_whitelist_ranges;
703} 703}
704 704
705int gk20a_get_global_whitelist_ranges_count(void) 705static int gk20a_get_global_whitelist_ranges_count(void)
706{ 706{
707 return gk20a_global_whitelist_ranges_count; 707 return gk20a_global_whitelist_ranges_count;
708} 708}
709 709
710const struct regop_offset_range *gk20a_get_context_whitelist_ranges(void) 710static const struct regop_offset_range *gk20a_get_context_whitelist_ranges(void)
711{ 711{
712 return gk20a_context_whitelist_ranges; 712 return gk20a_context_whitelist_ranges;
713} 713}
714 714
715int gk20a_get_context_whitelist_ranges_count(void) 715static int gk20a_get_context_whitelist_ranges_count(void)
716{ 716{
717 return gk20a_context_whitelist_ranges_count; 717 return gk20a_context_whitelist_ranges_count;
718} 718}
719 719
720const u32 *gk20a_get_runcontrol_whitelist(void) 720static const u32 *gk20a_get_runcontrol_whitelist(void)
721{ 721{
722 return gk20a_runcontrol_whitelist; 722 return gk20a_runcontrol_whitelist;
723} 723}
724 724
725int gk20a_get_runcontrol_whitelist_count(void) 725static int gk20a_get_runcontrol_whitelist_count(void)
726{ 726{
727 return gk20a_runcontrol_whitelist_count; 727 return gk20a_runcontrol_whitelist_count;
728} 728}
729 729
730const struct regop_offset_range *gk20a_get_runcontrol_whitelist_ranges(void) 730static const
731struct regop_offset_range *gk20a_get_runcontrol_whitelist_ranges(void)
731{ 732{
732 return gk20a_runcontrol_whitelist_ranges; 733 return gk20a_runcontrol_whitelist_ranges;
733} 734}
734 735
735int gk20a_get_runcontrol_whitelist_ranges_count(void) 736static int gk20a_get_runcontrol_whitelist_ranges_count(void)
736{ 737{
737 return gk20a_runcontrol_whitelist_ranges_count; 738 return gk20a_runcontrol_whitelist_ranges_count;
738} 739}
739 740
740const u32 *gk20a_get_qctl_whitelist(void) 741static const u32 *gk20a_get_qctl_whitelist(void)
741{ 742{
742 return gk20a_qctl_whitelist; 743 return gk20a_qctl_whitelist;
743} 744}
744 745
745int gk20a_get_qctl_whitelist_count(void) 746static int gk20a_get_qctl_whitelist_count(void)
746{ 747{
747 return gk20a_qctl_whitelist_count; 748 return gk20a_qctl_whitelist_count;
748} 749}
749 750
750const struct regop_offset_range *gk20a_get_qctl_whitelist_ranges(void) 751static const struct regop_offset_range *gk20a_get_qctl_whitelist_ranges(void)
751{ 752{
752 return gk20a_qctl_whitelist_ranges; 753 return gk20a_qctl_whitelist_ranges;
753} 754}
754 755
755int gk20a_get_qctl_whitelist_ranges_count(void) 756static int gk20a_get_qctl_whitelist_ranges_count(void)
756{ 757{
757 return gk20a_qctl_whitelist_ranges_count; 758 return gk20a_qctl_whitelist_ranges_count;
758} 759}
759 760
760int gk20a_apply_smpc_war(struct dbg_session_gk20a *dbg_s) 761static int gk20a_apply_smpc_war(struct dbg_session_gk20a *dbg_s)
761{ 762{
762 /* The following regops are a hack/war to make up for the fact that we 763 /* The following regops are a hack/war to make up for the fact that we
763 * just scribbled into the ctxsw image w/o really knowing whether 764 * just scribbled into the ctxsw image w/o really knowing whether