Re: [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

Re: [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 > > > > wrote: > > > > > > On Sun, 14 Sep 2014 18:40:13 +0200 > > Fabian Frederick wrote: > > > > > Small patchset using container_of instead of casting on first structur

Re: [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 > 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 offsets but its just convo

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

2014-09-14 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