From 9e69e0cf978b53706f55ffb873e3966b4bb3a7a8 Mon Sep 17 00:00:00 2001 From: Srirangan Date: Thu, 16 Aug 2018 11:33:55 +0530 Subject: gpu: nvgpu: common: 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, introducing the braces. JIRA NVGPU-671 Change-Id: I599cce2af1d6cdc24efefba4ec42abfe998aec47 Signed-off-by: Srirangan Reviewed-on: https://git-master.nvidia.com/r/1795845 Reviewed-by: Adeel Raza Reviewed-by: svc-misra-checker Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fb/fb_gk20a.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/common/fb/fb_gk20a.c') diff --git a/drivers/gpu/nvgpu/common/fb/fb_gk20a.c b/drivers/gpu/nvgpu/common/fb/fb_gk20a.c index 903bb983..d7e1a8a7 100644 --- a/drivers/gpu/nvgpu/common/fb/fb_gk20a.c +++ b/drivers/gpu/nvgpu/common/fb/fb_gk20a.c @@ -74,8 +74,9 @@ void gk20a_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) hw. Use the power_on flag to skip tlb invalidation when gpu power is turned off */ - if (!g->power_on) + if (!g->power_on) { return; + } addr_lo = u64_lo32(nvgpu_mem_get_addr(g, pdb) >> 12); @@ -87,14 +88,16 @@ void gk20a_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) do { data = gk20a_readl(g, fb_mmu_ctrl_r()); - if (fb_mmu_ctrl_pri_fifo_space_v(data) != 0) + if (fb_mmu_ctrl_pri_fifo_space_v(data) != 0) { break; + } nvgpu_udelay(2); } while (!nvgpu_timeout_expired_msg(&timeout, "wait mmu fifo space")); - if (nvgpu_timeout_peek_expired(&timeout)) + if (nvgpu_timeout_peek_expired(&timeout)) { goto out; + } nvgpu_timeout_init(g, &timeout, 1000, NVGPU_TIMER_RETRY_TIMER); @@ -112,8 +115,9 @@ void gk20a_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) do { data = gk20a_readl(g, fb_mmu_ctrl_r()); if (fb_mmu_ctrl_pri_fifo_empty_v(data) != - fb_mmu_ctrl_pri_fifo_empty_false_f()) + fb_mmu_ctrl_pri_fifo_empty_false_f()) { break; + } nvgpu_udelay(2); } while (!nvgpu_timeout_expired_msg(&timeout, "wait mmu invalidate")); -- cgit v1.2.2