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/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/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index c29c03f0..204fd371 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -250,7 +250,7 @@ struct gpu_ops { | |||
250 | int (*get_zcull_info)(struct gk20a *g, struct gr_gk20a *gr, | 250 | int (*get_zcull_info)(struct gk20a *g, struct gr_gk20a *gr, |
251 | struct gr_zcull_info *zcull_params); | 251 | struct gr_zcull_info *zcull_params); |
252 | int (*decode_egpc_addr)(struct gk20a *g, | 252 | int (*decode_egpc_addr)(struct gk20a *g, |
253 | u32 addr, int *addr_type, | 253 | u32 addr, enum ctxsw_addr_type *addr_type, |
254 | u32 *gpc_num, u32 *tpc_num, u32 *broadcast_flags); | 254 | u32 *gpc_num, u32 *tpc_num, u32 *broadcast_flags); |
255 | void (*egpc_etpc_priv_addr_table)(struct gk20a *g, u32 addr, | 255 | void (*egpc_etpc_priv_addr_table)(struct gk20a *g, u32 addr, |
256 | u32 gpc, u32 tpc, u32 broadcast_flags, | 256 | u32 gpc, u32 tpc, u32 broadcast_flags, |
@@ -473,7 +473,7 @@ struct gpu_ops { | |||
473 | u32 *count, u32 *offset, | 473 | u32 *count, u32 *offset, |
474 | u32 max_cnt, u32 base, u32 mask); | 474 | u32 max_cnt, u32 base, u32 mask); |
475 | int (*decode_priv_addr)(struct gk20a *g, u32 addr, | 475 | int (*decode_priv_addr)(struct gk20a *g, u32 addr, |
476 | int *addr_type, | 476 | enum ctxsw_addr_type *addr_type, |
477 | u32 *gpc_num, u32 *tpc_num, | 477 | u32 *gpc_num, u32 *tpc_num, |
478 | u32 *ppc_num, u32 *be_num, | 478 | u32 *ppc_num, u32 *be_num, |
479 | u32 *broadcast_flags); | 479 | u32 *broadcast_flags); |
@@ -495,8 +495,9 @@ struct gpu_ops { | |||
495 | struct channel_gk20a *c, bool patch); | 495 | struct channel_gk20a *c, bool patch); |
496 | u32 (*get_nonpes_aware_tpc)(struct gk20a *g, u32 gpc, u32 tpc); | 496 | u32 (*get_nonpes_aware_tpc)(struct gk20a *g, u32 gpc, u32 tpc); |
497 | int (*get_offset_in_gpccs_segment)(struct gk20a *g, | 497 | int (*get_offset_in_gpccs_segment)(struct gk20a *g, |
498 | int addr_type, u32 num_tpcs, u32 num_ppcs, | 498 | enum ctxsw_addr_type addr_type, u32 num_tpcs, |
499 | u32 reg_list_ppc_count, u32 *__offset_in_segment); | 499 | u32 num_ppcs, u32 reg_list_ppc_count, |
500 | u32 *__offset_in_segment); | ||
500 | } gr; | 501 | } gr; |
501 | struct { | 502 | struct { |
502 | void (*init_hw)(struct gk20a *g); | 503 | void (*init_hw)(struct gk20a *g); |