[Intel-gfx] [PATCH v5 2/7] drm: add parameter-order checking to drm memory allocators

2016-02-29 Thread Emil Velikov
On 29 February 2016 at 16:16, Tvrtko Ursulin wrote: > > On 29/02/16 11:13, Dave Gordon wrote: >> >> After the recent addition of drm_malloc_gfp(), it was noticed that >> some callers of these functions has swapped the parameters in the >> call - it's supposed to be 'number of members' and 'sizeof

[Intel-gfx] [PATCH v5 2/7] drm: add parameter-order checking to drm memory allocators

2016-02-29 Thread Chris Wilson
On Mon, Feb 29, 2016 at 04:16:57PM +, Tvrtko Ursulin wrote: > i915 cleanups are good but I am unsure of whether it is good to add > this constant constraints. All current code seems to use it like > that, true, but I am not sure that it should be a requirement. The drm_mem_util allocators are

[Intel-gfx] [PATCH v5 2/7] drm: add parameter-order checking to drm memory allocators

2016-02-29 Thread Tvrtko Ursulin
On 29/02/16 11:13, Dave Gordon wrote: > After the recent addition of drm_malloc_gfp(), it was noticed that > some callers of these functions has swapped the parameters in the > call - it's supposed to be 'number of members' and 'sizeof(element)', > but a few callers had got the size first and the

[PATCH v5 2/7] drm: add parameter-order checking to drm memory allocators

2016-02-29 Thread Dave Gordon
After the recent addition of drm_malloc_gfp(), it was noticed that some callers of these functions has swapped the parameters in the call - it's supposed to be 'number of members' and 'sizeof(element)', but a few callers had got the size first and the count second. This isn't otherwise detected bec