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/pmgr/pwrdev.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/pmgr/pwrdev.c')
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrdev.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pwrdev.c b/drivers/gpu/nvgpu/pmgr/pwrdev.c index 235629d6..90d39610 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrdev.c +++ b/drivers/gpu/nvgpu/pmgr/pwrdev.c | |||
@@ -40,8 +40,9 @@ static int _pwr_device_pmudata_instget(struct gk20a *g, | |||
40 | 40 | ||
41 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 41 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
42 | if (((u32)BIT(idx) & | 42 | if (((u32)BIT(idx) & |
43 | ppmgrdevice->hdr.data.super.obj_mask.super.data[0]) == 0) | 43 | ppmgrdevice->hdr.data.super.obj_mask.super.data[0]) == 0) { |
44 | return -EINVAL; | 44 | return -EINVAL; |
45 | } | ||
45 | 46 | ||
46 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) | 47 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) |
47 | &ppmgrdevice->devices[idx].data.board_obj; | 48 | &ppmgrdevice->devices[idx].data.board_obj; |
@@ -99,8 +100,9 @@ static struct boardobj *construct_pwr_device(struct gk20a *g, | |||
99 | 100 | ||
100 | status = boardobj_construct_super(g, &board_obj_ptr, | 101 | status = boardobj_construct_super(g, &board_obj_ptr, |
101 | pargs_size, pargs); | 102 | pargs_size, pargs); |
102 | if (status) | 103 | if (status) { |
103 | return NULL; | 104 | return NULL; |
105 | } | ||
104 | 106 | ||
105 | pwrdev = (struct pwr_device_ina3221*)board_obj_ptr; | 107 | pwrdev = (struct pwr_device_ina3221*)board_obj_ptr; |
106 | 108 | ||
@@ -250,8 +252,9 @@ static int devinit_get_pwr_device_table(struct gk20a *g, | |||
250 | pwr_device_data.ina3221.curr_correct_m = (1 << 12); | 252 | pwr_device_data.ina3221.curr_correct_m = (1 << 12); |
251 | } | 253 | } |
252 | pwr_device_size = sizeof(struct pwr_device_ina3221); | 254 | pwr_device_size = sizeof(struct pwr_device_ina3221); |
253 | } else | 255 | } else { |
254 | continue; | 256 | continue; |
257 | } | ||
255 | 258 | ||
256 | pwr_device_data.boardobj.type = CTRL_PMGR_PWR_DEVICE_TYPE_INA3221; | 259 | pwr_device_data.boardobj.type = CTRL_PMGR_PWR_DEVICE_TYPE_INA3221; |
257 | pwr_device_data.pwrdev.power_rail = (u8)0; | 260 | pwr_device_data.pwrdev.power_rail = (u8)0; |
@@ -306,8 +309,9 @@ int pmgr_device_sw_setup(struct gk20a *g) | |||
306 | pboardobjgrp->pmudatainstget = _pwr_device_pmudata_instget; | 309 | pboardobjgrp->pmudatainstget = _pwr_device_pmudata_instget; |
307 | 310 | ||
308 | status = devinit_get_pwr_device_table(g, ppwrdeviceobjs); | 311 | status = devinit_get_pwr_device_table(g, ppwrdeviceobjs); |
309 | if (status) | 312 | if (status) { |
310 | goto done; | 313 | goto done; |
314 | } | ||
311 | 315 | ||
312 | done: | 316 | done: |
313 | nvgpu_log_info(g, " done status %x", status); | 317 | nvgpu_log_info(g, " done status %x", status); |