summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmgr/pmgr.c
diff options
context:
space:
mode:
authorsmadhavan <smadhavan@nvidia.com>2018-09-06 04:38:00 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-12 08:36:04 -0400
commitc7a3b6db10900e0aabc29ca7307908875d685036 (patch)
tree1ee88207c5149344841b1423d0cb920498f844b0 /drivers/gpu/nvgpu/pmgr/pmgr.c
parentc615002d22b4675d08404eb7cc7087d4418eccdb (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/pmgr.c')
-rw-r--r--drivers/gpu/nvgpu/pmgr/pmgr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pmgr.c b/drivers/gpu/nvgpu/pmgr/pmgr.c
index 6be0f82f..227a9893 100644
--- a/drivers/gpu/nvgpu/pmgr/pmgr.c
+++ b/drivers/gpu/nvgpu/pmgr/pmgr.c
@@ -30,9 +30,10 @@ int pmgr_pwr_devices_get_power(struct gk20a *g, u32 *val)
30 int status; 30 int status;
31 31
32 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); 32 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload);
33 if (status) 33 if (status) {
34 nvgpu_err(g, "pmgr_pwr_devices_get_current_power failed %x", 34 nvgpu_err(g, "pmgr_pwr_devices_get_current_power failed %x",
35 status); 35 status);
36 }
36 37
37 *val = payload.devices[0].powerm_w; 38 *val = payload.devices[0].powerm_w;
38 39
@@ -45,9 +46,10 @@ int pmgr_pwr_devices_get_current(struct gk20a *g, u32 *val)
45 int status; 46 int status;
46 47
47 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); 48 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload);
48 if (status) 49 if (status) {
49 nvgpu_err(g, "pmgr_pwr_devices_get_current failed %x", 50 nvgpu_err(g, "pmgr_pwr_devices_get_current failed %x",
50 status); 51 status);
52 }
51 53
52 *val = payload.devices[0].currentm_a; 54 *val = payload.devices[0].currentm_a;
53 55
@@ -60,9 +62,10 @@ int pmgr_pwr_devices_get_voltage(struct gk20a *g, u32 *val)
60 int status; 62 int status;
61 63
62 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); 64 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload);
63 if (status) 65 if (status) {
64 nvgpu_err(g, "pmgr_pwr_devices_get_current_voltage failed %x", 66 nvgpu_err(g, "pmgr_pwr_devices_get_current_voltage failed %x",
65 status); 67 status);
68 }
66 69
67 *val = payload.devices[0].voltageu_v; 70 *val = payload.devices[0].voltageu_v;
68 71