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 <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2116065
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
This commit is contained in:
Seshendra Gadagottu
2019-05-09 18:08:08 -07:00
committed by Alex Waterman
parent 02e15b8a5e
commit 2019c9697d

View File

@@ -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);