mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: fix REMAP android build failure
Rework nvgpu_vm_remap_os_buf structure initialization to
avoid android/clang build issues with the use of a single pair
of {} to initialize certain structures.
The os-dependent nvgpu_vm_remap_os_buf_get() routine now does
a memset of the structure prior to initializing its contents.
Jira NVGPU-6804
Change-Id: I08682c6ab7b8324a605a56ed660dea5bea11d16b
Signed-off-by: scottl <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2553193
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
e9872a0d91
commit
cd3ad1ccc7
@@ -544,7 +544,7 @@ static int nvgpu_vm_remap_get_mpool(struct vm_gk20a *vm,
|
||||
struct nvgpu_vm_remap_mpool **curr_mpool,
|
||||
u32 *curr_mem_handle)
|
||||
{
|
||||
struct nvgpu_vm_remap_os_buffer remap_os_buf = { 0 };
|
||||
struct nvgpu_vm_remap_os_buffer remap_os_buf;
|
||||
int err = 0;
|
||||
|
||||
if (op->mem_handle == *curr_mem_handle) {
|
||||
|
||||
@@ -100,6 +100,8 @@ int nvgpu_vm_remap_os_buf_get(struct vm_gk20a *vm,
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
memset(remap_os_buf, 0, sizeof(*remap_os_buf));
|
||||
|
||||
remap_os_buf->os_priv.dmabuf = dmabuf;
|
||||
remap_os_buf->os_priv.attachment = attachment;
|
||||
remap_os_buf->os_priv.sgt = sgt;
|
||||
|
||||
Reference in New Issue
Block a user