Files
linux-nvgpu/drivers/gpu/nvgpu/common/rc
Sagar Kamble 04587333ca gpu: nvgpu: fix MISRA Rule 10.3 and 10.4 violations
BVEC changes for nvgpu_rc_pbdma_fault and nvgpu_rc_mmu_fault
started reporting below MISRA issue.

kernel/nvgpu/drivers/gpu/nvgpu/common/fifo/tsg.c:522:
  1. misra_c_2012_rule_10_4_violation: Essential type of the left hand
     operand "error_notifier" (unsigned) is not the same as that of
     the right operand "NVGPU_ERR_NOTIFIER_INVAL"(enum).

kernel/nvgpu/drivers/gpu/nvgpu/common/fifo/tsg.c:541:
  1. misra_c_2012_rule_10_3_violation: Implicit conversion of
     "NVGPU_ERR_NOTIFIER_FIFO_ERROR_MMU_ERR_FLT" from essential type
     "anonymous enum" to different or narrower essential type
     "unsigned 32-bit int".

Change the enum nvgpu_err_notif values to u32 values declared using
the #define macro.

JIRA NVGPU-6772

Change-Id: Icac7f567cea52cde07ca200b21eb3e7dd2b9e645
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2584153
(cherry picked from commit 2f073f341bd55242c857c6c6d35d6015495025e2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2623634
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-07-14 08:58:42 -07:00
..