diff options
author | smadhavan <smadhavan@nvidia.com> | 2018-09-06 04:38:00 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-12 08:36:04 -0400 |
commit | c7a3b6db10900e0aabc29ca7307908875d685036 (patch) | |
tree | 1ee88207c5149344841b1423d0cb920498f844b0 /drivers/gpu/nvgpu/therm/thrmdev.c | |
parent | c615002d22b4675d08404eb7cc7087d4418eccdb (diff) |
gpu: nvgpu: Fix MISRA 15.6 violations
MISRA Rule-15.6 requires that all if-else blocks be enclosed in braces,
including single statement blocks. Fix errors due to single statement
if blocks without braces by introducing the braces.
JIRA NVGPU-671
Change-Id: I8046a09fa7ffc74c3d737ba57132a0a9ae2ff195
Signed-off-by: smadhavan <smadhavan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1797699
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/therm/thrmdev.c')
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmdev.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/therm/thrmdev.c b/drivers/gpu/nvgpu/therm/thrmdev.c index ddd1f280..b0e65af7 100644 --- a/drivers/gpu/nvgpu/therm/thrmdev.c +++ b/drivers/gpu/nvgpu/therm/thrmdev.c | |||
@@ -43,8 +43,9 @@ static int _therm_device_pmudata_instget(struct gk20a *g, | |||
43 | 43 | ||
44 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 44 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
45 | if (((u32)BIT(idx) & | 45 | if (((u32)BIT(idx) & |
46 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) | 46 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) { |
47 | return -EINVAL; | 47 | return -EINVAL; |
48 | } | ||
48 | 49 | ||
49 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) | 50 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) |
50 | &pgrp_set->objects[idx].data; | 51 | &pgrp_set->objects[idx].data; |
@@ -208,8 +209,9 @@ static struct boardobj *therm_device_construct(struct gk20a *g, | |||
208 | board_obj_ptr = NULL; | 209 | board_obj_ptr = NULL; |
209 | nvgpu_err(g, | 210 | nvgpu_err(g, |
210 | "could not allocate memory for therm_device"); | 211 | "could not allocate memory for therm_device"); |
211 | if (board_obj_ptr != NULL) | 212 | if (board_obj_ptr != NULL) { |
212 | nvgpu_kfree(g, board_obj_ptr); | 213 | nvgpu_kfree(g, board_obj_ptr); |
214 | } | ||
213 | } | 215 | } |
214 | 216 | ||
215 | 217 | ||
@@ -347,8 +349,9 @@ int therm_device_sw_setup(struct gk20a *g) | |||
347 | pboardobjgrp->pmudatainstget = _therm_device_pmudata_instget; | 349 | pboardobjgrp->pmudatainstget = _therm_device_pmudata_instget; |
348 | 350 | ||
349 | status = devinit_get_therm_device_table(g, pthermdeviceobjs); | 351 | status = devinit_get_therm_device_table(g, pthermdeviceobjs); |
350 | if (status) | 352 | if (status) { |
351 | goto done; | 353 | goto done; |
354 | } | ||
352 | 355 | ||
353 | BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_DEVICE); | 356 | BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_DEVICE); |
354 | 357 | ||