gpu: host1x: Fix type casting in debug_hw.c

Fix a CERT-C Expression violation (CERT EXP39-C)
by properly casting the mapped pointer to
u32* when passing it to show_gather() function.
This ensures type compatibility between the
function parameter and the actual object
being accessed.

Fixes CID 12627322

Jira HOSTX-5971

Change-Id: I8a7224b46f4e36582a06d6d6ee1ba21da18fe43c
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324442
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
This commit is contained in:
Mainak Sen
2025-03-23 08:25:57 +00:00
committed by Jon Hunter
parent 3b36d6b76f
commit 970fbbcc73

View File

@@ -235,7 +235,7 @@ static void show_channel_gathers(struct output *o, struct host1x_cdma *cdma)
&g->base, g->offset, g->words); &g->base, g->offset, g->words);
show_gather(o, g->base + g->offset, g->words, NULL, show_gather(o, g->base + g->offset, g->words, NULL,
g->base, mapped); g->base, (u32 *)mapped);
if (!job->gather_copy_mapped) if (!job->gather_copy_mapped)
host1x_bo_munmap(g->bo, mapped); host1x_bo_munmap(g->bo, mapped);