summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c
diff options
context:
space:
mode:
authorAmulya <Amurthyreddy@nvidia.com>2018-08-06 01:07:32 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-14 00:51:09 -0400
commit2328d305b7c9437aa467922086b9fcfc0a4169ba (patch)
tree6d37f0f7bda427c296cfb06021715a2e01581f0c /drivers/gpu/nvgpu/gk20a/flcn_gk20a.c
parente62785190f74cfbf9003a190a768e9077373bf6f (diff)
gpu: nvgpu: MISRA 10.4 enum fixes
MISRA rule-10.4 only allows arithmetic conversions on operands of the same essential type category. Fix violations where an arithmetic conversion is performed on enum and non-enum types. JIRA NVGPU-993 Change-Id: I5391bb670d68982e0b5af6600995f70fe0cb2ad3 Signed-off-by: Amulya <Amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1792852 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/flcn_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/flcn_gk20a.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c b/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c
index 98fdb8c2..92f88333 100644
--- a/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c
@@ -139,7 +139,8 @@ static bool gk20a_is_falcon_scrubbing_done(struct nvgpu_falcon *flcn)
139 return status; 139 return status;
140} 140}
141 141
142static u32 gk20a_falcon_get_mem_size(struct nvgpu_falcon *flcn, u32 mem_type) 142static u32 gk20a_falcon_get_mem_size(struct nvgpu_falcon *flcn,
143 enum flcn_mem_type mem_type)
143{ 144{
144 struct gk20a *g = flcn->g; 145 struct gk20a *g = flcn->g;
145 u32 mem_size = 0; 146 u32 mem_size = 0;
@@ -157,7 +158,7 @@ static u32 gk20a_falcon_get_mem_size(struct nvgpu_falcon *flcn, u32 mem_type)
157} 158}
158 159
159static int flcn_mem_overflow_check(struct nvgpu_falcon *flcn, 160static int flcn_mem_overflow_check(struct nvgpu_falcon *flcn,
160 u32 offset, u32 size, u32 mem_type) 161 u32 offset, u32 size, enum flcn_mem_type mem_type)
161{ 162{
162 struct gk20a *g = flcn->g; 163 struct gk20a *g = flcn->g;
163 u32 mem_size = 0; 164 u32 mem_size = 0;