From ed60c25d3840c9d198e7b4b5f852382b02ed64bd Mon Sep 17 00:00:00 2001 From: Vijayakumar Date: Mon, 1 May 2017 12:26:14 +0530 Subject: 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 Reviewed-on: http://git-master/r/1472940 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker Reviewed-by: Sachin Nikam GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/volt/volt_pmu.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/volt') 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, static u32 volt_pmu_rpc_execute(struct gk20a *g, struct nv_pmu_volt_rpc *prpc_call) { - struct pmu_cmd cmd = { { 0 } }; - struct pmu_msg msg = { { 0 } }; - struct pmu_payload payload = { { 0 } }; + struct pmu_cmd cmd; + struct pmu_msg msg; + struct pmu_payload payload; u32 status = 0; u32 seqdesc; - struct volt_rpc_pmucmdhandler_params handler = {0}; + struct volt_rpc_pmucmdhandler_params handler; + + memset(&payload, 0, sizeof(struct pmu_payload)); + memset(&cmd, 0, sizeof(struct pmu_cmd)); + memset(&msg, 0, sizeof(struct pmu_msg)); + memset(&handler, 0, sizeof(struct volt_rpc_pmucmdhandler_params)); cmd.hdr.unit_id = PMU_UNIT_VOLT; cmd.hdr.size = (u32)sizeof(struct nv_pmu_volt_cmd) + -- cgit v1.2.2