mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Fix CERT ARR37-C errors in common.gr.ctx unit
Cert_arr37_c_violation: Using arithmetic operator on address which points to non-array object. Assign all pointer operands to array's 0th index address. Jira NVGPU-3585 Change-Id: I59c213ed6d17d2bfb6f58c649a1ec151fba2c72b Signed-off-by: Vinod G <vinodg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2133863 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@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
c3c541b1af
commit
1daaf83dce
@@ -321,8 +321,8 @@ static void nvgpu_gr_ctx_unmap_global_ctx_buffers(struct gk20a *g,
|
|||||||
struct nvgpu_gr_global_ctx_buffer_desc *global_ctx_buffer,
|
struct nvgpu_gr_global_ctx_buffer_desc *global_ctx_buffer,
|
||||||
struct vm_gk20a *vm)
|
struct vm_gk20a *vm)
|
||||||
{
|
{
|
||||||
u64 *g_bfr_va = gr_ctx->global_ctx_buffer_va;
|
u64 *g_bfr_va = &gr_ctx->global_ctx_buffer_va[0];
|
||||||
u32 *g_bfr_index = gr_ctx->global_ctx_buffer_index;
|
u32 *g_bfr_index = &gr_ctx->global_ctx_buffer_index[0];
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_log_fn(g, " ");
|
||||||
@@ -349,8 +349,8 @@ int nvgpu_gr_ctx_map_global_ctx_buffers(struct gk20a *g,
|
|||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_log_fn(g, " ");
|
||||||
|
|
||||||
g_bfr_va = gr_ctx->global_ctx_buffer_va;
|
g_bfr_va = &gr_ctx->global_ctx_buffer_va[0];
|
||||||
g_bfr_index = gr_ctx->global_ctx_buffer_index;
|
g_bfr_index = &gr_ctx->global_ctx_buffer_index[0];
|
||||||
|
|
||||||
/* Circular Buffer */
|
/* Circular Buffer */
|
||||||
#ifdef NVGPU_VPR
|
#ifdef NVGPU_VPR
|
||||||
|
|||||||
Reference in New Issue
Block a user