diff options
author | Arnd Bergmann <arnd@arndb.de> | 2020-01-07 22:46:37 +0100 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2020-01-08 13:51:56 +0100 |
commit | 50b81d77be31a95ba036e6403b921dc918328956 (patch) | |
tree | 794c2eed499c51f192a6e0059da8e9ce82336316 /drivers/gpu/drm/meson/meson_drv.h | |
parent | 72f775611daf3ce20358388facbaf11f22899fa2 (diff) | |
download | lwn-50b81d77be31a95ba036e6403b921dc918328956.tar.gz lwn-50b81d77be31a95ba036e6403b921dc918328956.zip |
drm: meson: fix address type confusion
Casting a pointer to dma_addr_t produces a warning:
drivers/gpu/drm/meson/meson_rdma.c: In function 'meson_rdma_free':
drivers/gpu/drm/meson/meson_rdma.c:59:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
priv->rdma.addr_phys = (dma_addr_t)NULL;
In this case, it's worse because the variable name has the suffix
'_phys', which often indicates a phys_addr_t rather than dma_addr_t,
i.e. yet another incompatible type.
Change it to use consistent naming and avoid NULL.
Fixes: 63fba242c464 ("drm/meson: add RDMA module driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200107214653.1173199-1-arnd@arndb.de
Diffstat (limited to 'drivers/gpu/drm/meson/meson_drv.h')
-rw-r--r-- | drivers/gpu/drm/meson/meson_drv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/meson/meson_drv.h b/drivers/gpu/drm/meson/meson_drv.h index f9a0c8e9d4d0..04fdf3826643 100644 --- a/drivers/gpu/drm/meson/meson_drv.h +++ b/drivers/gpu/drm/meson/meson_drv.h @@ -135,7 +135,7 @@ struct meson_drm { } venc; struct { - dma_addr_t addr_phys; + dma_addr_t addr_dma; uint32_t *addr; unsigned int offset; } rdma; |