[PATCH 0/9 linux-next] drivers/gpu/drm: use container_of where possible

2014-09-17 Thread Daniel Vetter
On Mon, Sep 15, 2014 at 08:15:54PM +0200, Fabian Frederick wrote: > > > > On 15 September 2014 at 01:13 One Thousand Gnomes > lxorguk.ukuu.org.uk> > > wrote: > > > > > > On Sun, 14 Sep 2014 18:40:13 +0200 > > Fabian Frederick wrote: > > > > > Small patchset using container_of instead of casting

[PATCH 0/9 linux-next] drivers/gpu/drm: use container_of where possible

2014-09-17 Thread One Thousand Gnomes
> What if someone doesn't know about that intention one day and inserts > some field in the structure at the "wrong place" ? Then we have code review. Also they are much more likely to simply change the code elsewhere and break it. Nobody afaik ever got this wrong, while the litany of other broken

[PATCH 0/9 linux-next] drivers/gpu/drm: use container_of where possible

2014-09-15 Thread Fabian Frederick
> On 15 September 2014 at 01:13 One Thousand Gnomes lxorguk.ukuu.org.uk> > wrote: > > > On Sun, 14 Sep 2014 18:40:13 +0200 > Fabian Frederick wrote: > > > Small patchset using container_of instead of casting on first structure > > member address. > > Why. Container_of is useful for random offse

[PATCH 0/9 linux-next] drivers/gpu/drm: use container_of where possible

2014-09-15 Thread One Thousand Gnomes
On Sun, 14 Sep 2014 18:40:13 +0200 Fabian Frederick wrote: > Small patchset using container_of instead of casting on first structure > member address. Why. Container_of is useful for random offsets but its just convoluting and confusing code which is designed with the fields intentionally at th

[PATCH 0/9 linux-next] drivers/gpu/drm: use container_of where possible

2014-09-14 Thread Fabian Frederick
Small patchset using container_of instead of casting on first structure member address. Fabian Frederick (9): drm/cirrus: use container_of to resolve cirrus_fbdev from drm_fb_helper drm/mgag200: use container_of to resolve mga_fbdev from drm_fb_helper drm/radeon: use container_of to res