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

drm/legacy: Fix type for drm_local_map.offset

drm_local_map.offset is not only used for resource_size_t but also
dma_addr_t which may be of different sizes.

Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Fixes: 8e4ff9b56957 ("drm: Remove the dma_alloc_coherent wrapper for internal usage")
Tested-by: Nathan Chancellor <natechancellor@gmail.com> # build
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200402215926.30714-1-chris@chris-wilson.co.uk

authored by

Chris Wilson and committed by
Daniel Vetter
b2ecb89c b513b0d4

+1 -1
+1 -1
include/drm/drm_legacy.h
··· 136 136 * Kernel side of a mapping 137 137 */ 138 138 struct drm_local_map { 139 - resource_size_t offset; /**< Requested physical address (0 for SAREA)*/ 139 + dma_addr_t offset; /**< Requested physical address (0 for SAREA)*/ 140 140 unsigned long size; /**< Requested physical size (bytes) */ 141 141 enum drm_map_type type; /**< Type of memory to map */ 142 142 enum drm_map_flags flags; /**< Flags */