diff options
author | Srirangan <smadhavan@nvidia.com> | 2018-08-16 02:03:55 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-20 08:46:25 -0400 |
commit | 9e69e0cf978b53706f55ffb873e3966b4bb3a7a8 (patch) | |
tree | 2437cda373f2c37419e14b89772fb3c5f6d234e4 /drivers/gpu/nvgpu/common/fb/fb_gk20a.c | |
parent | de10cedf8caca9fd01f1b85031e538843da23252 (diff) |
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 <smadhavan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1795845
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
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/common/fb/fb_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/fb/fb_gk20a.c | 12 |
1 files changed, 8 insertions, 4 deletions
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) | |||
74 | hw. Use the power_on flag to skip tlb invalidation when gpu | 74 | hw. Use the power_on flag to skip tlb invalidation when gpu |
75 | power is turned off */ | 75 | power is turned off */ |
76 | 76 | ||
77 | if (!g->power_on) | 77 | if (!g->power_on) { |
78 | return; | 78 | return; |
79 | } | ||
79 | 80 | ||
80 | addr_lo = u64_lo32(nvgpu_mem_get_addr(g, pdb) >> 12); | 81 | addr_lo = u64_lo32(nvgpu_mem_get_addr(g, pdb) >> 12); |
81 | 82 | ||
@@ -87,14 +88,16 @@ void gk20a_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) | |||
87 | 88 | ||
88 | do { | 89 | do { |
89 | data = gk20a_readl(g, fb_mmu_ctrl_r()); | 90 | data = gk20a_readl(g, fb_mmu_ctrl_r()); |
90 | if (fb_mmu_ctrl_pri_fifo_space_v(data) != 0) | 91 | if (fb_mmu_ctrl_pri_fifo_space_v(data) != 0) { |
91 | break; | 92 | break; |
93 | } | ||
92 | nvgpu_udelay(2); | 94 | nvgpu_udelay(2); |
93 | } while (!nvgpu_timeout_expired_msg(&timeout, | 95 | } while (!nvgpu_timeout_expired_msg(&timeout, |
94 | "wait mmu fifo space")); | 96 | "wait mmu fifo space")); |
95 | 97 | ||
96 | if (nvgpu_timeout_peek_expired(&timeout)) | 98 | if (nvgpu_timeout_peek_expired(&timeout)) { |
97 | goto out; | 99 | goto out; |
100 | } | ||
98 | 101 | ||
99 | nvgpu_timeout_init(g, &timeout, 1000, NVGPU_TIMER_RETRY_TIMER); | 102 | nvgpu_timeout_init(g, &timeout, 1000, NVGPU_TIMER_RETRY_TIMER); |
100 | 103 | ||
@@ -112,8 +115,9 @@ void gk20a_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) | |||
112 | do { | 115 | do { |
113 | data = gk20a_readl(g, fb_mmu_ctrl_r()); | 116 | data = gk20a_readl(g, fb_mmu_ctrl_r()); |
114 | if (fb_mmu_ctrl_pri_fifo_empty_v(data) != | 117 | if (fb_mmu_ctrl_pri_fifo_empty_v(data) != |
115 | fb_mmu_ctrl_pri_fifo_empty_false_f()) | 118 | fb_mmu_ctrl_pri_fifo_empty_false_f()) { |
116 | break; | 119 | break; |
120 | } | ||
117 | nvgpu_udelay(2); | 121 | nvgpu_udelay(2); |
118 | } while (!nvgpu_timeout_expired_msg(&timeout, | 122 | } while (!nvgpu_timeout_expired_msg(&timeout, |
119 | "wait mmu invalidate")); | 123 | "wait mmu invalidate")); |