Skip to content

Commit

Permalink
drm: don't cast a pointer to pointer of list_head
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and Dave Airlie committed Feb 7, 2008
1 parent a96ca10 commit d5b0d1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/drm/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d5b0d1b

Please sign in to comment.