From 970fbbcc7379683ab74fdee097a92ea72ec09cd8 Mon Sep 17 00:00:00 2001 From: Mainak Sen Date: Sun, 23 Mar 2025 08:25:57 +0000 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324442 Reviewed-by: Vamsee Vardhan Thummala GVS: buildbot_gerritrpt Reviewed-by: Raghavendra Vishnu Kumar --- drivers/gpu/host1x/hw/debug_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c index 2cedc2cc..cafe5e81 100644 --- a/drivers/gpu/host1x/hw/debug_hw.c +++ b/drivers/gpu/host1x/hw/debug_hw.c @@ -235,7 +235,7 @@ static void show_channel_gathers(struct output *o, struct host1x_cdma *cdma) &g->base, g->offset, g->words); show_gather(o, g->base + g->offset, g->words, NULL, - g->base, mapped); + g->base, (u32 *)mapped); if (!job->gather_copy_mapped) host1x_bo_munmap(g->bo, mapped);