diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-11-04 08:14:28 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:12:01 -0400 |
commit | b3f575074b66e8af1a9943874f9782b793fa7edc (patch) | |
tree | c4aaa1defc512cf5a896edc25445f169de184ece /drivers/gpu/nvgpu/gk20a/regops_gk20a.c | |
parent | 797e4dd319bd2b9e13ce0e44a3bbbb75e4820330 (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.c | 29 |
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 | ||
700 | const struct regop_offset_range *gk20a_get_global_whitelist_ranges(void) | 700 | static 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 | ||
705 | int gk20a_get_global_whitelist_ranges_count(void) | 705 | static 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 | ||
710 | const struct regop_offset_range *gk20a_get_context_whitelist_ranges(void) | 710 | static 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 | ||
715 | int gk20a_get_context_whitelist_ranges_count(void) | 715 | static 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 | ||
720 | const u32 *gk20a_get_runcontrol_whitelist(void) | 720 | static const u32 *gk20a_get_runcontrol_whitelist(void) |
721 | { | 721 | { |
722 | return gk20a_runcontrol_whitelist; | 722 | return gk20a_runcontrol_whitelist; |
723 | } | 723 | } |
724 | 724 | ||
725 | int gk20a_get_runcontrol_whitelist_count(void) | 725 | static 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 | ||
730 | const struct regop_offset_range *gk20a_get_runcontrol_whitelist_ranges(void) | 730 | static const |
731 | struct 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 | ||
735 | int gk20a_get_runcontrol_whitelist_ranges_count(void) | 736 | static 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 | ||
740 | const u32 *gk20a_get_qctl_whitelist(void) | 741 | static const u32 *gk20a_get_qctl_whitelist(void) |
741 | { | 742 | { |
742 | return gk20a_qctl_whitelist; | 743 | return gk20a_qctl_whitelist; |
743 | } | 744 | } |
744 | 745 | ||
745 | int gk20a_get_qctl_whitelist_count(void) | 746 | static 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 | ||
750 | const struct regop_offset_range *gk20a_get_qctl_whitelist_ranges(void) | 751 | static 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 | ||
755 | int gk20a_get_qctl_whitelist_ranges_count(void) | 756 | static 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 | ||
760 | int gk20a_apply_smpc_war(struct dbg_session_gk20a *dbg_s) | 761 | static 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 |