From c9ef5c4a1c691ebcdfa4261b406b8b81f7b5a18f Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Fri, 31 Mar 2017 12:30:55 +0900 Subject: [PATCH] exynos: fix type-punned pointer build warning As like the commit ecc2a097294d ("xf86drm: Fix type-punned pointer build warning"), this fixes following build warning. exynos_drm.c: In function 'exynos_handle_event': exynos_drm.c:420:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e = (struct drm_event *) &buffer[i]; ^ Signed-off-by: Seung-Woo Kim Reviewed-by: Tobias Jakobi Reviewed-by: Emil Velikov --- exynos/exynos_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c index b961e520..f6204f1c 100644 --- a/exynos/exynos_drm.c +++ b/exynos/exynos_drm.c @@ -417,7 +417,7 @@ exynos_handle_event(struct exynos_device *dev, struct exynos_event_context *ctx) i = 0; while (i < len) { - e = (struct drm_event *) &buffer[i]; + e = (struct drm_event *)(buffer + i); switch (e->type) { case DRM_EVENT_VBLANK: if (evctx->version < 1 ||