gpu: nvgpu: fixing MISRA violations

- MISRA Directive 4.7
  Calling function "nvgpu_tsg_unbind_channel(tsg, ch, true)" which returns
  error information without testing the error information.

- MISRA Rule 10.3
  Implicit conversion from essential type "unsigned 64-bit int" to different
  or narrower essential type "unsigned 32-bit int"

- MISRA Rule 5.7
  A tag name shall be a unique identifier

JIRA NVGPU-5955

Change-Id: I109e0c01848c76a0947848e91cc6bb17d4cf7d24
Signed-off-by: srajum <srajum@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2572776
(cherry picked from commit 073daafe8a11e86806be966711271be51d99c18e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2678681
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
srajum
2021-08-08 23:08:34 +05:30
committed by mobile promotions
parent 069fe05dca
commit 8381647662
15 changed files with 30 additions and 50 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -296,7 +296,7 @@ done:
}
g->ops.fifo.is_preempt_pending =
stub_fifo_is_preempt_pending_pass;
err = nvgpu_tsg_force_unbind_channel(tsg, ch);
err = nvgpu_tsg_unbind_channel(tsg, ch, true);
if (err != 0) {
unit_err(m, "Cannot unbind channel\n");
}
@@ -495,7 +495,7 @@ done:
}
g->ops.fifo.is_preempt_pending =
stub_fifo_is_preempt_pending_pass;
err = nvgpu_tsg_force_unbind_channel(tsg, ch);
err = nvgpu_tsg_unbind_channel(tsg, ch, true);
if (err != 0) {
unit_err(m, "Cannot unbind channel\n");
}