diff options
author | Vinod G <vinodg@nvidia.com> | 2018-05-16 13:43:13 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-18 17:53:58 -0400 |
commit | ac687c95d383c3fb0165e6535893510409559a8e (patch) | |
tree | 7a76099c05186ad636704c07c5409bbc8547f20f /drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |
parent | de67fb18fb639b7a605c77eeb2e1c639a8a3d67e (diff) |
gpu: nvgpu: Code updates for MISRA violations
Code related to MC module is updated for handling
MISRA violations
Rule 10.1: Operands shalln't be an inappropriate
essential type.
Rule 10.3: Value of expression shalln't be assigned
to an object with a narrow essential type.
Rule 10.4: Both operands in an operator shall have
the same essential type.
Rule 14.4: Controlling if statement shall have
essentially Boolean type.
Rule 15.6: Enclose if() sequences with braces.
JIRA NVGPU-646
JIRA NVGPU-659
JIRA NVGPU-671
Change-Id: Ia7ada40068eab5c164b8bad99bf8103b37a2fbc9
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1720926
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 576a4ac8..cf3ac167 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | #ifndef __FIFO_GK20A_H__ | 24 | #ifndef FIFO_GK20A_H |
25 | #define __FIFO_GK20A_H__ | 25 | #define FIFO_GK20A_H |
26 | 26 | ||
27 | #include "channel_gk20a.h" | 27 | #include "channel_gk20a.h" |
28 | #include "tsg_gk20a.h" | 28 | #include "tsg_gk20a.h" |
@@ -103,10 +103,10 @@ struct fifo_runlist_info_gk20a { | |||
103 | }; | 103 | }; |
104 | 104 | ||
105 | enum { | 105 | enum { |
106 | ENGINE_GR_GK20A = 0, | 106 | ENGINE_GR_GK20A = 0U, |
107 | ENGINE_GRCE_GK20A = 1, | 107 | ENGINE_GRCE_GK20A = 1U, |
108 | ENGINE_ASYNC_CE_GK20A = 2, | 108 | ENGINE_ASYNC_CE_GK20A = 2U, |
109 | ENGINE_INVAL_GK20A | 109 | ENGINE_INVAL_GK20A = 3U, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | struct fifo_pbdma_exception_info_gk20a { | 112 | struct fifo_pbdma_exception_info_gk20a { |
@@ -140,7 +140,7 @@ struct fifo_engine_info_gk20a { | |||
140 | }; | 140 | }; |
141 | 141 | ||
142 | enum { | 142 | enum { |
143 | PROFILE_IOCTL_ENTRY = 0, | 143 | PROFILE_IOCTL_ENTRY = 0U, |
144 | PROFILE_ENTRY, | 144 | PROFILE_ENTRY, |
145 | PROFILE_JOB_TRACKING, | 145 | PROFILE_JOB_TRACKING, |
146 | PROFILE_APPEND, | 146 | PROFILE_APPEND, |
@@ -231,7 +231,7 @@ int gk20a_init_fifo_support(struct gk20a *g); | |||
231 | int gk20a_init_fifo_setup_hw(struct gk20a *g); | 231 | int gk20a_init_fifo_setup_hw(struct gk20a *g); |
232 | 232 | ||
233 | void gk20a_fifo_isr(struct gk20a *g); | 233 | void gk20a_fifo_isr(struct gk20a *g); |
234 | int gk20a_fifo_nonstall_isr(struct gk20a *g); | 234 | u32 gk20a_fifo_nonstall_isr(struct gk20a *g); |
235 | 235 | ||
236 | int gk20a_fifo_preempt_channel(struct gk20a *g, u32 chid); | 236 | int gk20a_fifo_preempt_channel(struct gk20a *g, u32 chid); |
237 | int gk20a_fifo_preempt_tsg(struct gk20a *g, u32 tsgid); | 237 | int gk20a_fifo_preempt_tsg(struct gk20a *g, u32 tsgid); |
@@ -454,4 +454,4 @@ void gk20a_fifo_add_sema_cmd(struct gk20a *g, | |||
454 | struct nvgpu_semaphore *s, u64 sema_va, | 454 | struct nvgpu_semaphore *s, u64 sema_va, |
455 | struct priv_cmd_entry *cmd, | 455 | struct priv_cmd_entry *cmd, |
456 | u32 off, bool acquire, bool wfi); | 456 | u32 off, bool acquire, bool wfi); |
457 | #endif /*__GR_GK20A_H__*/ | 457 | #endif /* FIFO_GK20A_H */ |