Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5b0d1b5 authored by Li Zefan's avatar Li Zefan Committed by Dave Airlie
Browse files

drm: don't cast a pointer to pointer of list_head



The casting is safe only when the list_head member is the first member of
the structure.

Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent a96ca105
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -555,7 +555,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data,

	spin_lock_irqsave(&dev_priv->swaps_lock, irqflags);

	list_add_tail((struct list_head *)vbl_swap, &dev_priv->vbl_swaps.head);
	list_add_tail(&vbl_swap->head, &dev_priv->vbl_swaps.head);
	dev_priv->swaps_pending++;

	spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);