habanalabs: Fix test build failures

allmodconfig builds on 32-bit architectures fail with the following error.

drivers/misc/habanalabs/common/memory.c: In function 'alloc_device_memory':
drivers/misc/habanalabs/common/memory.c:153:49: error:
cast from pointer to integer of different size

Fix the typecast. While at it, drop other unnecessary typecasts associated
with the same commit.

Fixes: e8458e20e0a3c ("habanalabs: make sure device mem alloc is page aligned")
Cc: Ohad Sharabi <osharabi@habana.ai>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220404134859.3278599-1-linux@roeck-us.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by Guenter Roeck and committed by Greg Kroah-Hartman 94865e2d 31231092

Changed files
+8 -8
drivers
misc
habanalabs
common
+8 -8
drivers/misc/habanalabs/common/memory.c
··· 111 111 112 112 if (contiguous) { 113 113 if (is_power_of_2(page_size)) 114 - paddr = (u64) (uintptr_t) gen_pool_dma_alloc_align(vm->dram_pg_pool, 115 - total_size, NULL, page_size); 114 + paddr = (uintptr_t) gen_pool_dma_alloc_align(vm->dram_pg_pool, 115 + total_size, NULL, page_size); 116 116 else 117 - paddr = (u64) (uintptr_t) gen_pool_alloc(vm->dram_pg_pool, total_size); 117 + paddr = gen_pool_alloc(vm->dram_pg_pool, total_size); 118 118 if (!paddr) { 119 119 dev_err(hdev->dev, 120 120 "failed to allocate %llu contiguous pages with total size of %llu\n", ··· 150 150 for (i = 0 ; i < num_pgs ; i++) { 151 151 if (is_power_of_2(page_size)) 152 152 phys_pg_pack->pages[i] = 153 - (u64) gen_pool_dma_alloc_align(vm->dram_pg_pool, 154 - page_size, NULL, 155 - page_size); 153 + (uintptr_t)gen_pool_dma_alloc_align(vm->dram_pg_pool, 154 + page_size, NULL, 155 + page_size); 156 156 else 157 - phys_pg_pack->pages[i] = (u64) gen_pool_alloc(vm->dram_pg_pool, 158 - page_size); 157 + phys_pg_pack->pages[i] = gen_pool_alloc(vm->dram_pg_pool, 158 + page_size); 159 159 if (!phys_pg_pack->pages[i]) { 160 160 dev_err(hdev->dev, 161 161 "Failed to allocate device memory (out of memory)\n");