media: omap_vout: use dma_addr_t consistently
authorArnd Bergmann <arnd@arndb.de>
Mon, 27 Sep 2021 13:41:06 +0000 (15:41 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 8 Oct 2021 09:26:13 +0000 (11:26 +0200)
commit92b7b90c9005b75f8cd48f9a89737fb40ae365f2
treeba74279c6b204d73ea4ce743a99a56cdfccb62e9
parent8888a2ff634e9cf1d62457109811afc43c2be2ed
media: omap_vout: use dma_addr_t consistently

gcc notices that the driver mixes 'dma_addr_t' 'u8 *' and 'u32'
to store DMA addresses:

drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_vb2_prepare':
drivers/media/platform/omap/omap_vout.c:979:37: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  vout->queued_buf_addr[vb->index] = (u8 *)buf_phy_addr;
                                     ^
drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_create_video_devices':
drivers/media/platform/omap/omap_vout.c:1479:21: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   vout->fbuf.base = (void *)info.paddr;

Use dma_addr_t everywhere here to avoid the type conversions and document
what the address is used for. Assigning to vout->fbuf.base still requires
a cast, since that is part of the driver independent data structure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/omap/omap_vout.c
drivers/media/platform/omap/omap_vout_vrfb.c
drivers/media/platform/omap/omap_voutdef.h