summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorVinod G <vinodg@nvidia.com>2018-05-16 13:43:13 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-18 17:53:58 -0400
commitac687c95d383c3fb0165e6535893510409559a8e (patch)
tree7a76099c05186ad636704c07c5409bbc8547f20f /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parentde67fb18fb639b7a605c77eeb2e1c639a8a3d67e (diff)
gpu: nvgpu: Code updates for MISRA violations
Code related to MC module is updated for handling MISRA violations Rule 10.1: Operands shalln't be an inappropriate essential type. Rule 10.3: Value of expression shalln't be assigned to an object with a narrow essential type. Rule 10.4: Both operands in an operator shall have the same essential type. Rule 14.4: Controlling if statement shall have essentially Boolean type. Rule 15.6: Enclose if() sequences with braces. JIRA NVGPU-646 JIRA NVGPU-659 JIRA NVGPU-671 Change-Id: Ia7ada40068eab5c164b8bad99bf8103b37a2fbc9 Signed-off-by: Vinod G <vinodg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1720926 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index c7d028b2..5fd0eb0c 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -6134,18 +6134,18 @@ int gk20a_gr_isr(struct gk20a *g)
6134 return 0; 6134 return 0;
6135} 6135}
6136 6136
6137int gk20a_gr_nonstall_isr(struct gk20a *g) 6137u32 gk20a_gr_nonstall_isr(struct gk20a *g)
6138{ 6138{
6139 int ops = 0; 6139 u32 ops = 0;
6140 u32 gr_intr = gk20a_readl(g, gr_intr_nonstall_r()); 6140 u32 gr_intr = gk20a_readl(g, gr_intr_nonstall_r());
6141 6141
6142 nvgpu_log(g, gpu_dbg_intr, "pgraph nonstall intr %08x", gr_intr); 6142 nvgpu_log(g, gpu_dbg_intr, "pgraph nonstall intr %08x", gr_intr);
6143 6143
6144 if (gr_intr & gr_intr_nonstall_trap_pending_f()) { 6144 if ((gr_intr & gr_intr_nonstall_trap_pending_f()) != 0U) {
6145 /* Clear the interrupt */ 6145 /* Clear the interrupt */
6146 gk20a_writel(g, gr_intr_nonstall_r(), 6146 gk20a_writel(g, gr_intr_nonstall_r(),
6147 gr_intr_nonstall_trap_pending_f()); 6147 gr_intr_nonstall_trap_pending_f());
6148 ops |= (gk20a_nonstall_ops_wakeup_semaphore | 6148 ops |= (u32)(gk20a_nonstall_ops_wakeup_semaphore |
6149 gk20a_nonstall_ops_post_events); 6149 gk20a_nonstall_ops_post_events);
6150 } 6150 }
6151 return ops; 6151 return ops;