gpu: nvgpu: fix misra violations in SDL

This patch addresses misra violations due to SDL error reporting
callbacks. In particular, it addresses the following misra violation:

- misra_c_2012_directive_4_7_violation: Calling function
  "nvgpu_report_*_err()" which returns error information without testing
  the error information.

JIRA NVGPU-4025

Change-Id: Ia10b6b3fd9c127a8c5189c3b6ba316f243cedf04
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2196895
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Rajesh Devaraj
2019-09-13 14:19:42 +05:30
committed by Alex Waterman
parent 84bb355525
commit 935c5f6578
26 changed files with 152 additions and 230 deletions

View File

@@ -57,7 +57,6 @@ void nvgpu_preempt_poll_tsg_on_pbdma(struct gk20a *g,
unsigned long runlist_served_pbdmas;
unsigned long pbdma_id_bit;
u32 tsgid, pbdma_id;
int err;
if (g->ops.fifo.preempt_poll_pbdma == NULL) {
return;
@@ -78,15 +77,10 @@ void nvgpu_preempt_poll_tsg_on_pbdma(struct gk20a *g,
* GPU. Any sort of hang indicates the entire GPUs
* memory system would be blocked.
*/
if (g->ops.fifo.preempt_poll_pbdma(g, tsgid,
pbdma_id) != 0) {
err = nvgpu_report_host_err(g, NVGPU_ERR_MODULE_HOST,
if (g->ops.fifo.preempt_poll_pbdma(g, tsgid, pbdma_id) != 0) {
nvgpu_report_host_err(g, NVGPU_ERR_MODULE_HOST,
pbdma_id,
GPU_HOST_PBDMA_PREEMPT_ERROR, 0);
if (err == 0) {
nvgpu_info(g, "failed to report PBDMA preempt failed error");
}
nvgpu_err(g, "PBDMA preempt failed");
}
}