diff options
author | Amulya <Amurthyreddy@nvidia.com> | 2018-08-09 01:10:08 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-22 20:31:33 -0400 |
commit | 1c13da1d29c344cb60953eabeca56b601446c64a (patch) | |
tree | 145a1a133b2d85592e0ddd1a25b12fc48e879829 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | f3c3e4dece89c5e2f77fbfaf3cacd877ba62406c (diff) |
gpu: nvgpu: Changed enum gmmu_pgsz_gk20a into macros
Changed the enum gmmu_pgsz_gk20a into macros and changed all the
instances of it.
The enum gmmu_pgsz_gk20a was being used in for loops, where it was
compared with an integer. This violates MISRA rule 10.4, which only
allows arithmetic operations on operands of the same essential type
category. Changing this enum into macro will fix this violation.
JIRA NVGPU-993
Change-Id: I6f18b08bc7548093d99e8229378415bcdec749e3
Signed-off-by: Amulya <Amurthyreddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1795593
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 262dbb2c..5300f7dd 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -921,7 +921,7 @@ struct gpu_ops { | |||
921 | struct nvgpu_sgt *sgt, | 921 | struct nvgpu_sgt *sgt, |
922 | u64 buffer_offset, | 922 | u64 buffer_offset, |
923 | u64 size, | 923 | u64 size, |
924 | int pgsz_idx, | 924 | u32 pgsz_idx, |
925 | u8 kind_v, | 925 | u8 kind_v, |
926 | u32 ctag_offset, | 926 | u32 ctag_offset, |
927 | u32 flags, | 927 | u32 flags, |
@@ -934,7 +934,7 @@ struct gpu_ops { | |||
934 | void (*gmmu_unmap)(struct vm_gk20a *vm, | 934 | void (*gmmu_unmap)(struct vm_gk20a *vm, |
935 | u64 vaddr, | 935 | u64 vaddr, |
936 | u64 size, | 936 | u64 size, |
937 | int pgsz_idx, | 937 | u32 pgsz_idx, |
938 | bool va_allocated, | 938 | bool va_allocated, |
939 | enum gk20a_mem_rw_flag rw_flag, | 939 | enum gk20a_mem_rw_flag rw_flag, |
940 | bool sparse, | 940 | bool sparse, |