diff options
author | Srirangan <smadhavan@nvidia.com> | 2018-08-27 01:59:01 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-29 11:59:35 -0400 |
commit | e3710e5431d8f14f1b8c2812f5c1aeeb7bdaac1c (patch) | |
tree | 8a6498b12e10f6b391d3c5dd7c6ac7b340ca60b4 /drivers/gpu/nvgpu/gp106/fifo_gp106.c | |
parent | 2f97e683feed3c3ba3c8722c4f6ab7466bcef0c0 (diff) |
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 <smadhavan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1796806
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/fifo_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/fifo_gp106.c | 10 |
1 files changed, 6 insertions, 4 deletions
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[] = { | |||
85 | 85 | ||
86 | void gp106_fifo_get_mmu_fault_gpc_desc(struct mmu_fault_info *mmfault) | 86 | void gp106_fifo_get_mmu_fault_gpc_desc(struct mmu_fault_info *mmfault) |
87 | { | 87 | { |
88 | if (mmfault->client_id >= ARRAY_SIZE(gp106_gpc_client_descs)) | 88 | if (mmfault->client_id >= ARRAY_SIZE(gp106_gpc_client_descs)) { |
89 | WARN_ON(mmfault->client_id >= | 89 | WARN_ON(mmfault->client_id >= |
90 | ARRAY_SIZE(gp106_gpc_client_descs)); | 90 | ARRAY_SIZE(gp106_gpc_client_descs)); |
91 | else | 91 | } else { |
92 | mmfault->client_id_desc = | 92 | mmfault->client_id_desc = |
93 | gp106_gpc_client_descs[mmfault->client_id]; | 93 | gp106_gpc_client_descs[mmfault->client_id]; |
94 | } | ||
94 | } | 95 | } |
95 | 96 | ||
96 | /* fill in mmu fault client description */ | 97 | /* fill in mmu fault client description */ |
97 | void gp106_fifo_get_mmu_fault_client_desc(struct mmu_fault_info *mmfault) | 98 | void gp106_fifo_get_mmu_fault_client_desc(struct mmu_fault_info *mmfault) |
98 | { | 99 | { |
99 | if (mmfault->client_id >= ARRAY_SIZE(gp106_hub_client_descs)) | 100 | if (mmfault->client_id >= ARRAY_SIZE(gp106_hub_client_descs)) { |
100 | WARN_ON(mmfault->client_id >= | 101 | WARN_ON(mmfault->client_id >= |
101 | ARRAY_SIZE(gp106_hub_client_descs)); | 102 | ARRAY_SIZE(gp106_hub_client_descs)); |
102 | else | 103 | } else { |
103 | mmfault->client_id_desc = | 104 | mmfault->client_id_desc = |
104 | gp106_hub_client_descs[mmfault->client_id]; | 105 | gp106_hub_client_descs[mmfault->client_id]; |
106 | } | ||
105 | } | 107 | } |