diff options
author | Amulya <Amurthyreddy@nvidia.com> | 2018-08-06 01:07:32 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-14 00:51:09 -0400 |
commit | 2328d305b7c9437aa467922086b9fcfc0a4169ba (patch) | |
tree | 6d37f0f7bda427c296cfb06021715a2e01581f0c /drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |
parent | e62785190f74cfbf9003a190a768e9077373bf6f (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.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index 804e0e25..2b31b6b6 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |||
@@ -70,6 +70,8 @@ struct tsg_gk20a; | |||
70 | struct channel_gk20a; | 70 | struct channel_gk20a; |
71 | struct nvgpu_warpstate; | 71 | struct nvgpu_warpstate; |
72 | 72 | ||
73 | enum ctxsw_addr_type; | ||
74 | |||
73 | enum /* global_ctx_buffer */ { | 75 | enum /* global_ctx_buffer */ { |
74 | CIRCULAR = 0, | 76 | CIRCULAR = 0, |
75 | PAGEPOOL = 1, | 77 | PAGEPOOL = 1, |
@@ -842,7 +844,7 @@ int gr_gk20a_add_ctxsw_reg_perf_pma(struct ctxsw_buf_offset_map_entry *map, | |||
842 | u32 *count, u32 *offset, | 844 | u32 *count, u32 *offset, |
843 | u32 max_cnt, u32 base, u32 mask); | 845 | u32 max_cnt, u32 base, u32 mask); |
844 | int gr_gk20a_decode_priv_addr(struct gk20a *g, u32 addr, | 846 | int gr_gk20a_decode_priv_addr(struct gk20a *g, u32 addr, |
845 | int *addr_type, | 847 | enum ctxsw_addr_type *addr_type, |
846 | u32 *gpc_num, u32 *tpc_num, u32 *ppc_num, u32 *be_num, | 848 | u32 *gpc_num, u32 *tpc_num, u32 *ppc_num, u32 *be_num, |
847 | u32 *broadcast_flags); | 849 | u32 *broadcast_flags); |
848 | int gr_gk20a_split_ppc_broadcast_addr(struct gk20a *g, u32 addr, | 850 | int gr_gk20a_split_ppc_broadcast_addr(struct gk20a *g, u32 addr, |
@@ -856,7 +858,7 @@ void gr_gk20a_split_fbpa_broadcast_addr(struct gk20a *g, u32 addr, | |||
856 | u32 num_fbpas, | 858 | u32 num_fbpas, |
857 | u32 *priv_addr_table, u32 *t); | 859 | u32 *priv_addr_table, u32 *t); |
858 | int gr_gk20a_get_offset_in_gpccs_segment(struct gk20a *g, | 860 | int gr_gk20a_get_offset_in_gpccs_segment(struct gk20a *g, |
859 | int addr_type, u32 num_tpcs, u32 num_ppcs, | 861 | enum ctxsw_addr_type addr_type, u32 num_tpcs, u32 num_ppcs, |
860 | u32 reg_list_ppc_count, u32 *__offset_in_segment); | 862 | u32 reg_list_ppc_count, u32 *__offset_in_segment); |
861 | 863 | ||
862 | void gk20a_gr_destroy_ctx_buffer(struct gk20a *g, | 864 | void gk20a_gr_destroy_ctx_buffer(struct gk20a *g, |