lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230807163238.2091-3-dakr@redhat.com>
Date:   Mon,  7 Aug 2023 18:32:23 +0200
From:   Danilo Krummrich <dakr@...hat.com>
To:     airlied@...il.com, daniel@...ll.ch, bskeggs@...hat.com,
        kherbst@...hat.com, lyude@...hat.com, sfr@...b.auug.org.au
Cc:     dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, Danilo Krummrich <dakr@...hat.com>,
        kernel test robot <lkp@...el.com>
Subject: [PATCH drm-misc-next 2/5] drm/nouveau: nvkm: vmm: silence warning from cast

Cast the integer to a pointer-sized type first to keep the compiler
happy.

Fixes: 6b252cf42281 ("drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm")
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Danilo Krummrich <dakr@...hat.com>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
index 38b7ced934b1..46cbd4cedb78 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
@@ -399,6 +399,8 @@ nvkm_uvmm_mthd_raw_map(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args)
 		.no_comp = true,
 	};
 	struct nvkm_memory *memory;
+	void *argv = (void *)(uintptr_t)args->argv;
+	int argc = args->argc;
 	u64 handle = args->memory;
 	u8 refd;
 	int ret;
@@ -418,8 +420,7 @@ nvkm_uvmm_mthd_raw_map(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args)
 		return PTR_ERR(memory);
 	}
 
-	ret = nvkm_memory_map(memory, args->offset, vmm, &vma,
-			      (void *)args->argv, args->argc);
+	ret = nvkm_memory_map(memory, args->offset, vmm, &vma, argv, argc);
 
 	nvkm_memory_unref(&vma.memory);
 	nvkm_memory_unref(&memory);
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ