Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: da8xx-fb: remove incorrect type cast

The probe function correct passes a dma_addr_t pointer into
dma_alloc_coherent(), but has a cast to resource_size_t, which
might be different from dma_addr_t:

drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe':
drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]

This removes the cast, which avoids the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Arnd Bergmann and committed by
Tomi Valkeinen
ef88ee4e b54729b6

+3 -3
+3 -3
drivers/video/fbdev/da8xx-fb.c
··· 152 152 153 153 struct da8xx_fb_par { 154 154 struct device *dev; 155 - resource_size_t p_palette_base; 155 + dma_addr_t p_palette_base; 156 156 unsigned char *v_palette_base; 157 157 dma_addr_t vram_phys; 158 158 unsigned long vram_size; ··· 1428 1428 1429 1429 par->vram_virt = dma_alloc_coherent(NULL, 1430 1430 par->vram_size, 1431 - (resource_size_t *) &par->vram_phys, 1431 + &par->vram_phys, 1432 1432 GFP_KERNEL | GFP_DMA); 1433 1433 if (!par->vram_virt) { 1434 1434 dev_err(&device->dev, ··· 1448 1448 1449 1449 /* allocate palette buffer */ 1450 1450 par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE, 1451 - (resource_size_t *)&par->p_palette_base, 1451 + &par->p_palette_base, 1452 1452 GFP_KERNEL | GFP_DMA); 1453 1453 if (!par->v_palette_base) { 1454 1454 dev_err(&device->dev,