From 2019c9697ddef4eb5893c369a163b0018cb97c57 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Thu, 9 May 2019 18:08:08 -0700 Subject: [PATCH] gpu: nvgpu: Fix MISRA 11.3 error in common netlist Use uintptr_t casting to avoid following error: The object pointer expression "netlist_fw->data" of type "u8 *" is cast to type "struct netlist_image *" JIRA NVGPU-3420 Change-Id: Ice2e22eefc40c1f33ee9be68f460d3f8b3a2225c Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/2116065 GVS: Gerrit_Virtual_Submit Reviewed-by: Thomas Fleury Reviewed-by: Vinod Gopalakrishnakurup --- drivers/gpu/nvgpu/common/netlist/netlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/common/netlist/netlist.c b/drivers/gpu/nvgpu/common/netlist/netlist.c index ceedf73b4..feacc245a 100644 --- a/drivers/gpu/nvgpu/common/netlist/netlist.c +++ b/drivers/gpu/nvgpu/common/netlist/netlist.c @@ -162,7 +162,7 @@ static int nvgpu_netlist_init_ctx_vars_fw(struct gk20a *g) continue; } - netlist = (struct netlist_image *)netlist_fw->data; + netlist = (struct netlist_image *)(uintptr_t)netlist_fw->data; for (i = 0; i < netlist->header.regions; i++) { u8 *src = ((u8 *)netlist + netlist->regions[i].data_offset);