gpu: nvgpu: fifo: fix MISRA 10.3 violations

MISRA Rule 10.3 prohibits assigning objects of different essential or
narrower type. This fixes MISRA 10.3 violations in the common/fifo unit.

JIRA NVGPU-3023

Change-Id: Ibab6704e8d3cffd37c6c0e31ba6fc6c0bb7b517b
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2087812
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2019-04-01 11:07:04 -04:00
committed by mobile promotions
parent 295ff82fc9
commit c0b65e8b05
13 changed files with 23 additions and 12 deletions

View File

@@ -437,9 +437,17 @@ static int __gk20a_channel_open(struct gk20a *g,
int err;
struct channel_gk20a *ch;
struct channel_priv *priv;
u32 tmp_runlist_id;
nvgpu_log_fn(g, " ");
nvgpu_assert(runlist_id >= -1);
if (runlist_id == -1) {
tmp_runlist_id = NVGPU_ENGINE_GR_GK20A;
} else {
tmp_runlist_id = runlist_id;
}
g = gk20a_get(g);
if (!g)
return -ENODEV;
@@ -458,7 +466,7 @@ static int __gk20a_channel_open(struct gk20a *g,
goto fail_busy;
}
/* All the user space channel should be non privilege */
ch = gk20a_open_new_channel(g, runlist_id, false,
ch = gk20a_open_new_channel(g, tmp_runlist_id, false,
nvgpu_current_pid(g), nvgpu_current_tid(g));
gk20a_idle(g);
if (!ch) {