summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_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/gr_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/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index bedd39eb..5539b801 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -6274,7 +6274,7 @@ static int gr_gk20a_find_priv_offset_in_pm_buffer(struct gk20a *g,
6274 6274
6275/* This function will decode a priv address and return the partition type and numbers. */ 6275/* This function will decode a priv address and return the partition type and numbers. */
6276int gr_gk20a_decode_priv_addr(struct gk20a *g, u32 addr, 6276int gr_gk20a_decode_priv_addr(struct gk20a *g, u32 addr,
6277 int *addr_type, /* enum ctxsw_addr_type */ 6277 enum ctxsw_addr_type *addr_type,
6278 u32 *gpc_num, u32 *tpc_num, u32 *ppc_num, u32 *be_num, 6278 u32 *gpc_num, u32 *tpc_num, u32 *ppc_num, u32 *be_num,
6279 u32 *broadcast_flags) 6279 u32 *broadcast_flags)
6280{ 6280{
@@ -6391,7 +6391,7 @@ int gr_gk20a_create_priv_addr_table(struct gk20a *g,
6391 u32 *priv_addr_table, 6391 u32 *priv_addr_table,
6392 u32 *num_registers) 6392 u32 *num_registers)
6393{ 6393{
6394 int addr_type; /*enum ctxsw_addr_type */ 6394 enum ctxsw_addr_type addr_type;
6395 u32 gpc_num, tpc_num, ppc_num, be_num; 6395 u32 gpc_num, tpc_num, ppc_num, be_num;
6396 u32 priv_addr, gpc_addr; 6396 u32 priv_addr, gpc_addr;
6397 u32 broadcast_flags; 6397 u32 broadcast_flags;
@@ -7036,7 +7036,7 @@ static int gr_gk20a_find_priv_offset_in_ext_buffer(struct gk20a *g,
7036 7036
7037static int 7037static int
7038gr_gk20a_process_context_buffer_priv_segment(struct gk20a *g, 7038gr_gk20a_process_context_buffer_priv_segment(struct gk20a *g,
7039 int addr_type,/* enum ctxsw_addr_type */ 7039 enum ctxsw_addr_type addr_type,
7040 u32 pri_addr, 7040 u32 pri_addr,
7041 u32 gpc_num, u32 num_tpcs, 7041 u32 gpc_num, u32 num_tpcs,
7042 u32 num_ppcs, u32 ppc_mask, 7042 u32 num_ppcs, u32 ppc_mask,
@@ -7214,7 +7214,7 @@ static int gr_gk20a_determine_ppc_configuration(struct gk20a *g,
7214} 7214}
7215 7215
7216int gr_gk20a_get_offset_in_gpccs_segment(struct gk20a *g, 7216int gr_gk20a_get_offset_in_gpccs_segment(struct gk20a *g,
7217 int addr_type, 7217 enum ctxsw_addr_type addr_type,
7218 u32 num_tpcs, 7218 u32 num_tpcs,
7219 u32 num_ppcs, 7219 u32 num_ppcs,
7220 u32 reg_list_ppc_count, 7220 u32 reg_list_ppc_count,
@@ -7289,7 +7289,7 @@ static int gr_gk20a_find_priv_offset_in_buffer(struct gk20a *g,
7289{ 7289{
7290 u32 i, data32; 7290 u32 i, data32;
7291 int err; 7291 int err;
7292 int addr_type; /*enum ctxsw_addr_type */ 7292 enum ctxsw_addr_type addr_type;
7293 u32 broadcast_flags; 7293 u32 broadcast_flags;
7294 u32 gpc_num, tpc_num, ppc_num, be_num; 7294 u32 gpc_num, tpc_num, ppc_num, be_num;
7295 u32 num_gpcs, num_tpcs, num_ppcs; 7295 u32 num_gpcs, num_tpcs, num_ppcs;