mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: fix MISRA 16.4 violation in gr.obj_ctx unit
Below MISRA 16.4 violations are reported in gr.obj_ctx unit nvgpu/drivers/gpu/nvgpu/common/gr/obj_ctx.c:135: misra_violation: The switch statement "switch (graphics_preempt_mode)" does not have a non-empty default clause. nvgpu/drivers/gpu/nvgpu/common/gr/obj_ctx.c:188: misra_violation: The switch statement "switch (compute_preempt_mode)" does not have a non-empty default clause. Fix them by adding a debug print in default case Jira NVGPU-3407 Change-Id: I0beabd020885f574f798a852008b5ccac919b450 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2114366 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: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
92a7cebea6
commit
b2a10e5452
@@ -180,6 +180,8 @@ int nvgpu_gr_obj_ctx_set_ctxsw_preemption_mode(struct gk20a *g,
|
||||
break;
|
||||
|
||||
default:
|
||||
nvgpu_log_info(g, "graphics_preempt_mode=%u",
|
||||
graphics_preempt_mode);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -193,6 +195,8 @@ int nvgpu_gr_obj_ctx_set_ctxsw_preemption_mode(struct gk20a *g,
|
||||
compute_preempt_mode);
|
||||
break;
|
||||
default:
|
||||
nvgpu_log_info(g, "compute_preempt_mode=%u",
|
||||
compute_preempt_mode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user