summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/therm
diff options
context:
space:
mode:
authorVijayakumar <vsubbu@nvidia.com>2017-05-01 02:56:14 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-02 11:04:28 -0400
commited60c25d3840c9d198e7b4b5f852382b02ed64bd (patch)
tree1f93d2837fc7500329749d8682e40dbd6e3b406a /drivers/gpu/nvgpu/therm
parent3c44df6c98b0242cacba94d97a893d57eb46bb00 (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/therm')
-rw-r--r--drivers/gpu/nvgpu/therm/thrmpmu.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/therm/thrmpmu.c b/drivers/gpu/nvgpu/therm/thrmpmu.c
index 3d80eff3..84e9871a 100644
--- a/drivers/gpu/nvgpu/therm/thrmpmu.c
+++ b/drivers/gpu/nvgpu/therm/thrmpmu.c
@@ -115,11 +115,17 @@ exit:
115static u32 therm_set_warn_temp_limit(struct gk20a *g) 115static u32 therm_set_warn_temp_limit(struct gk20a *g)
116{ 116{
117 u32 seqdesc = 0; 117 u32 seqdesc = 0;
118 struct pmu_cmd cmd = { {0} }; 118 struct pmu_cmd cmd;
119 struct pmu_msg msg = { {0} }; 119 struct pmu_msg msg;
120 struct pmu_payload payload = { {0} }; 120 struct pmu_payload payload;
121 struct nv_pmu_therm_rpc rpccall = {0}; 121 struct nv_pmu_therm_rpc rpccall;
122 struct therm_pmucmdhandler_params handlerparams = {0}; 122 struct therm_pmucmdhandler_params handlerparams;
123
124 memset(&payload, 0, sizeof(struct pmu_payload));
125 memset(&cmd, 0, sizeof(struct pmu_cmd));
126 memset(&msg, 0, sizeof(struct pmu_msg));
127 memset(&rpccall, 0, sizeof(struct nv_pmu_therm_rpc));
128 memset(&handlerparams, 0, sizeof(struct therm_pmucmdhandler_params));
123 129
124 rpccall.function = NV_PMU_THERM_RPC_ID_SLCT_EVENT_TEMP_TH_SET; 130 rpccall.function = NV_PMU_THERM_RPC_ID_SLCT_EVENT_TEMP_TH_SET;
125 rpccall.params.slct_event_temp_th_set.event_id = 131 rpccall.params.slct_event_temp_th_set.event_id =
@@ -178,11 +184,17 @@ static u32 therm_enable_slct_notification_request(struct gk20a *g)
178static u32 therm_send_slct_configuration_to_pmu(struct gk20a *g) 184static u32 therm_send_slct_configuration_to_pmu(struct gk20a *g)
179{ 185{
180 u32 seqdesc = 0; 186 u32 seqdesc = 0;
181 struct pmu_cmd cmd = { {0} }; 187 struct pmu_cmd cmd;
182 struct pmu_msg msg = { {0} }; 188 struct pmu_msg msg;
183 struct pmu_payload payload = { {0} }; 189 struct pmu_payload payload;
184 struct nv_pmu_therm_rpc rpccall = {0}; 190 struct nv_pmu_therm_rpc rpccall;
185 struct therm_pmucmdhandler_params handlerparams = {0}; 191 struct therm_pmucmdhandler_params handlerparams;
192
193 memset(&payload, 0, sizeof(struct pmu_payload));
194 memset(&cmd, 0, sizeof(struct pmu_cmd));
195 memset(&msg, 0, sizeof(struct pmu_msg));
196 memset(&rpccall, 0, sizeof(struct nv_pmu_therm_rpc));
197 memset(&handlerparams, 0, sizeof(struct therm_pmucmdhandler_params));
186 198
187 rpccall.function = NV_PMU_THERM_RPC_ID_SLCT; 199 rpccall.function = NV_PMU_THERM_RPC_ID_SLCT;
188 rpccall.params.slct.mask_enabled = 200 rpccall.params.slct.mask_enabled =