diff options
author | Vijayakumar <vsubbu@nvidia.com> | 2017-05-01 02:56:14 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-02 11:04:28 -0400 |
commit | ed60c25d3840c9d198e7b4b5f852382b02ed64bd (patch) | |
tree | 1f93d2837fc7500329749d8682e40dbd6e3b406a /drivers/gpu/nvgpu/perf/perf.c | |
parent | 3c44df6c98b0242cacba94d97a893d57eb46bb00 (diff) |
gpu: nvgpu: fix error for static code analysis
use memset to fill structures with zero instead of
assigning zero.
mark functions local to the file as static
fixing errors in clk, perf and therm modules.
Bug 200299572
Change-Id: I0470298803c35b6faed2edc2a0c1dbf0e47e842e
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/1472940
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/perf/perf.c')
-rw-r--r-- | drivers/gpu/nvgpu/perf/perf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/perf/perf.c b/drivers/gpu/nvgpu/perf/perf.c index 871ff753..9adcadb6 100644 --- a/drivers/gpu/nvgpu/perf/perf.c +++ b/drivers/gpu/nvgpu/perf/perf.c | |||
@@ -61,11 +61,15 @@ u32 perf_pmu_vfe_load(struct gk20a *g) | |||
61 | { | 61 | { |
62 | struct pmu_cmd cmd; | 62 | struct pmu_cmd cmd; |
63 | struct pmu_msg msg; | 63 | struct pmu_msg msg; |
64 | struct pmu_payload payload = { {0} }; | 64 | struct pmu_payload payload; |
65 | u32 status; | 65 | u32 status; |
66 | u32 seqdesc; | 66 | u32 seqdesc; |
67 | struct nv_pmu_perf_rpc rpccall = {0}; | 67 | struct nv_pmu_perf_rpc rpccall; |
68 | struct perfrpc_pmucmdhandler_params handler = {0}; | 68 | struct perfrpc_pmucmdhandler_params handler; |
69 | |||
70 | memset(&payload, 0, sizeof(struct pmu_payload)); | ||
71 | memset(&rpccall, 0, sizeof(struct nv_pmu_perf_rpc)); | ||
72 | memset(&handler, 0, sizeof(struct perfrpc_pmucmdhandler_params)); | ||
69 | 73 | ||
70 | /*register call back for future VFE updates*/ | 74 | /*register call back for future VFE updates*/ |
71 | g->ops.perf.handle_pmu_perf_event = pmu_handle_perf_event; | 75 | g->ops.perf.handle_pmu_perf_event = pmu_handle_perf_event; |