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

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: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>

authored by

Li Zefan and committed by
Dave Airlie
d5b0d1b5 a96ca105

+1 -1
+1 -1
drivers/char/drm/i915_irq.c
··· 555 555 556 556 spin_lock_irqsave(&dev_priv->swaps_lock, irqflags); 557 557 558 - list_add_tail((struct list_head *)vbl_swap, &dev_priv->vbl_swaps.head); 558 + list_add_tail(&vbl_swap->head, &dev_priv->vbl_swaps.head); 559 559 dev_priv->swaps_pending++; 560 560 561 561 spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);