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/pwrpolicy.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/pwrpolicy.c')
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrpolicy.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c index 13a94e4f..d3fd941e 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c +++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c | |||
@@ -264,8 +264,9 @@ static struct boardobj *construct_pwr_policy(struct gk20a *g, | |||
264 | 264 | ||
265 | status = boardobj_construct_super(g, &board_obj_ptr, | 265 | status = boardobj_construct_super(g, &board_obj_ptr, |
266 | pargs_size, pargs); | 266 | pargs_size, pargs); |
267 | if (status) | 267 | if (status) { |
268 | return NULL; | 268 | return NULL; |
269 | } | ||
269 | 270 | ||
270 | pwrpolicyhwthreshold = (struct pwr_policy_hw_threshold*)board_obj_ptr; | 271 | pwrpolicyhwthreshold = (struct pwr_policy_hw_threshold*)board_obj_ptr; |
271 | pwrpolicy = (struct pwr_policy *)board_obj_ptr; | 272 | pwrpolicy = (struct pwr_policy *)board_obj_ptr; |
@@ -575,8 +576,9 @@ static int devinit_get_pwr_policy_table(struct gk20a *g, | |||
575 | packed_entry->flags0, | 576 | packed_entry->flags0, |
576 | NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_CLASS); | 577 | NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_CLASS); |
577 | 578 | ||
578 | if (class_type != NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_CLASS_HW_THRESHOLD) | 579 | if (class_type != NV_VBIOS_POWER_POLICY_3X_ENTRY_FLAGS0_CLASS_HW_THRESHOLD) { |
579 | continue; | 580 | continue; |
581 | } | ||
580 | 582 | ||
581 | /* unpack power policy table entry */ | 583 | /* unpack power policy table entry */ |
582 | devinit_unpack_pwr_policy_entry(&entry, packed_entry); | 584 | devinit_unpack_pwr_policy_entry(&entry, packed_entry); |
@@ -759,8 +761,9 @@ int pmgr_policy_sw_setup(struct gk20a *g) | |||
759 | pboardobjgrp = &(g->pmgr_pmu.pmgr_policyobjs.pwr_policies.super); | 761 | pboardobjgrp = &(g->pmgr_pmu.pmgr_policyobjs.pwr_policies.super); |
760 | 762 | ||
761 | status = devinit_get_pwr_policy_table(g, ppwrpolicyobjs); | 763 | status = devinit_get_pwr_policy_table(g, ppwrpolicyobjs); |
762 | if (status) | 764 | if (status) { |
763 | goto done; | 765 | goto done; |
766 | } | ||
764 | 767 | ||
765 | g->pmgr_pmu.pmgr_policyobjs.b_enabled = true; | 768 | g->pmgr_pmu.pmgr_policyobjs.b_enabled = true; |
766 | 769 | ||