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/mm_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/mm_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/mm_gp106.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/mm_gp106.c b/drivers/gpu/nvgpu/gp106/mm_gp106.c index 4a3a4a19..7864880f 100644 --- a/drivers/gpu/nvgpu/gp106/mm_gp106.c +++ b/drivers/gpu/nvgpu/gp106/mm_gp106.c | |||
@@ -39,8 +39,9 @@ size_t gp106_mm_get_vidmem_size(struct gk20a *g) | |||
39 | u32 ecc = fb_mmu_local_memory_range_ecc_mode_v(range); | 39 | u32 ecc = fb_mmu_local_memory_range_ecc_mode_v(range); |
40 | size_t bytes = ((size_t)mag << scale) * SZ_1M; | 40 | size_t bytes = ((size_t)mag << scale) * SZ_1M; |
41 | 41 | ||
42 | if (ecc) | 42 | if (ecc) { |
43 | bytes = bytes / 16 * 15; | 43 | bytes = bytes / 16 * 15; |
44 | } | ||
44 | 45 | ||
45 | return bytes; | 46 | return bytes; |
46 | } | 47 | } |