From e3710e5431d8f14f1b8c2812f5c1aeeb7bdaac1c Mon Sep 17 00:00:00 2001 From: Srirangan Date: Mon, 27 Aug 2018 11:29:01 +0530 Subject: gpu: nvgpu: gp106: 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: I8493274995ed8de526902dd0ca0808b2972e28aa Signed-off-by: Srirangan Reviewed-on: https://git-master.nvidia.com/r/1796806 Reviewed-by: svc-misra-checker Reviewed-by: Konsta Holtta GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp106/fifo_gp106.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106/fifo_gp106.c') diff --git a/drivers/gpu/nvgpu/gp106/fifo_gp106.c b/drivers/gpu/nvgpu/gp106/fifo_gp106.c index c1428306..8202426e 100644 --- a/drivers/gpu/nvgpu/gp106/fifo_gp106.c +++ b/drivers/gpu/nvgpu/gp106/fifo_gp106.c @@ -85,21 +85,23 @@ static const char * const gp106_gpc_client_descs[] = { void gp106_fifo_get_mmu_fault_gpc_desc(struct mmu_fault_info *mmfault) { - if (mmfault->client_id >= ARRAY_SIZE(gp106_gpc_client_descs)) + if (mmfault->client_id >= ARRAY_SIZE(gp106_gpc_client_descs)) { WARN_ON(mmfault->client_id >= ARRAY_SIZE(gp106_gpc_client_descs)); - else + } else { mmfault->client_id_desc = gp106_gpc_client_descs[mmfault->client_id]; + } } /* fill in mmu fault client description */ void gp106_fifo_get_mmu_fault_client_desc(struct mmu_fault_info *mmfault) { - if (mmfault->client_id >= ARRAY_SIZE(gp106_hub_client_descs)) + if (mmfault->client_id >= ARRAY_SIZE(gp106_hub_client_descs)) { WARN_ON(mmfault->client_id >= ARRAY_SIZE(gp106_hub_client_descs)); - else + } else { mmfault->client_id_desc = gp106_hub_client_descs[mmfault->client_id]; + } } -- cgit v1.2.2