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/thrmchannel.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/thrmchannel.c')
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmchannel.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/therm/thrmchannel.c b/drivers/gpu/nvgpu/therm/thrmchannel.c index 7d196422..8130656c 100644 --- a/drivers/gpu/nvgpu/therm/thrmchannel.c +++ b/drivers/gpu/nvgpu/therm/thrmchannel.c | |||
@@ -73,8 +73,9 @@ static struct boardobj *construct_channel_device(struct gk20a *g, | |||
73 | 73 | ||
74 | status = boardobj_construct_super(g, &board_obj_ptr, | 74 | status = boardobj_construct_super(g, &board_obj_ptr, |
75 | pargs_size, pargs); | 75 | pargs_size, pargs); |
76 | if (status) | 76 | if (status) { |
77 | return NULL; | 77 | return NULL; |
78 | } | ||
78 | 79 | ||
79 | /* Set Super class interfaces */ | 80 | /* Set Super class interfaces */ |
80 | board_obj_ptr->pmudatainit = _therm_channel_pmudatainit_device; | 81 | board_obj_ptr->pmudatainit = _therm_channel_pmudatainit_device; |
@@ -108,8 +109,9 @@ static int _therm_channel_pmudata_instget(struct gk20a *g, | |||
108 | 109 | ||
109 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 110 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
110 | if (((u32)BIT(idx) & | 111 | if (((u32)BIT(idx) & |
111 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) | 112 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) { |
112 | return -EINVAL; | 113 | return -EINVAL; |
114 | } | ||
113 | 115 | ||
114 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) | 116 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) |
115 | &pgrp_set->objects[idx].data.board_obj; | 117 | &pgrp_set->objects[idx].data.board_obj; |
@@ -233,8 +235,9 @@ int therm_channel_sw_setup(struct gk20a *g) | |||
233 | pboardobjgrp->pmudatainstget = _therm_channel_pmudata_instget; | 235 | pboardobjgrp->pmudatainstget = _therm_channel_pmudata_instget; |
234 | 236 | ||
235 | status = devinit_get_therm_channel_table(g, pthermchannelobjs); | 237 | status = devinit_get_therm_channel_table(g, pthermchannelobjs); |
236 | if (status) | 238 | if (status) { |
237 | goto done; | 239 | goto done; |
240 | } | ||
238 | 241 | ||
239 | BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_CHANNEL); | 242 | BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_CHANNEL); |
240 | 243 | ||