From: Li Zefan Date: Sun, 16 Dec 2007 23:47:19 +0000 (+1000) Subject: drm: don't cast a pointer to pointer of list_head X-Git-Tag: v2.6.25-rc1~301^2~7 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5b0d1b5bda979b077cf011e79fc19677663afc4;hp=a96ca105a68bc66c564accdfeb81c36e1d5d46b3;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie --- diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c index 3f02ff593bb..b273fe4e134 100644 --- a/drivers/char/drm/i915_irq.c +++ b/drivers/char/drm/i915_irq.c @@ -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);