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/volt/volt_pmu.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/volt/volt_pmu.c')
-rw-r--r-- | drivers/gpu/nvgpu/volt/volt_pmu.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/volt/volt_pmu.c b/drivers/gpu/nvgpu/volt/volt_pmu.c index dd2a0a63..871afce5 100644 --- a/drivers/gpu/nvgpu/volt/volt_pmu.c +++ b/drivers/gpu/nvgpu/volt/volt_pmu.c | |||
@@ -51,12 +51,17 @@ static void volt_rpc_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg, | |||
51 | static u32 volt_pmu_rpc_execute(struct gk20a *g, | 51 | static u32 volt_pmu_rpc_execute(struct gk20a *g, |
52 | struct nv_pmu_volt_rpc *prpc_call) | 52 | struct nv_pmu_volt_rpc *prpc_call) |
53 | { | 53 | { |
54 | struct pmu_cmd cmd = { { 0 } }; | 54 | struct pmu_cmd cmd; |
55 | struct pmu_msg msg = { { 0 } }; | 55 | struct pmu_msg msg; |
56 | struct pmu_payload payload = { { 0 } }; | 56 | struct pmu_payload payload; |
57 | u32 status = 0; | 57 | u32 status = 0; |
58 | u32 seqdesc; | 58 | u32 seqdesc; |
59 | struct volt_rpc_pmucmdhandler_params handler = {0}; | 59 | struct volt_rpc_pmucmdhandler_params handler; |
60 | |||
61 | memset(&payload, 0, sizeof(struct pmu_payload)); | ||
62 | memset(&cmd, 0, sizeof(struct pmu_cmd)); | ||
63 | memset(&msg, 0, sizeof(struct pmu_msg)); | ||
64 | memset(&handler, 0, sizeof(struct volt_rpc_pmucmdhandler_params)); | ||
60 | 65 | ||
61 | cmd.hdr.unit_id = PMU_UNIT_VOLT; | 66 | cmd.hdr.unit_id = PMU_UNIT_VOLT; |
62 | cmd.hdr.size = (u32)sizeof(struct nv_pmu_volt_cmd) + | 67 | cmd.hdr.size = (u32)sizeof(struct nv_pmu_volt_cmd) + |