From c7a3b6db10900e0aabc29ca7307908875d685036 Mon Sep 17 00:00:00 2001 From: smadhavan Date: Thu, 6 Sep 2018 14:08:00 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1797699 Reviewed-by: svc-misra-checker Reviewed-by: Nitin Kumbhar GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/pmgr/pmgr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/pmgr/pmgr.c') 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) int status; status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); - if (status) + if (status) { nvgpu_err(g, "pmgr_pwr_devices_get_current_power failed %x", status); + } *val = payload.devices[0].powerm_w; @@ -45,9 +46,10 @@ int pmgr_pwr_devices_get_current(struct gk20a *g, u32 *val) int status; status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); - if (status) + if (status) { nvgpu_err(g, "pmgr_pwr_devices_get_current failed %x", status); + } *val = payload.devices[0].currentm_a; @@ -60,9 +62,10 @@ int pmgr_pwr_devices_get_voltage(struct gk20a *g, u32 *val) int status; status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); - if (status) + if (status) { nvgpu_err(g, "pmgr_pwr_devices_get_current_voltage failed %x", status); + } *val = payload.devices[0].voltageu_v; -- cgit v1.2.2