[PATCH] drm: move allocation out of drm_get_format_name()

2016-11-07 Thread Eric Engestrom
On Sunday, 2016-11-06 08:03:47 -0500, Rob Clark wrote: > On Sun, Nov 6, 2016 at 4:47 AM, Christian König > wrote: > > Am 05.11.2016 um 17:49 schrieb Rob Clark: > >> > >> On Sat, Nov 5, 2016 at 12:38 PM, Eric Engestrom > >> wrote: > >>> > >>> On Saturday, 2016-11-05 13:11:36 +0100, Christian

[PATCH] drm: move allocation out of drm_get_format_name()

2016-11-06 Thread Christian König
Am 05.11.2016 um 17:49 schrieb Rob Clark: > On Sat, Nov 5, 2016 at 12:38 PM, Eric Engestrom wrote: >> On Saturday, 2016-11-05 13:11:36 +0100, Christian König wrote: >>> Am 05.11.2016 um 02:33 schrieb Eric Engestrom: +typedef char drm_format_name_buf[32]; >>> Please don't use a typedef for

[PATCH] drm: move allocation out of drm_get_format_name()

2016-11-06 Thread Rob Clark
On Sun, Nov 6, 2016 at 4:47 AM, Christian König wrote: > Am 05.11.2016 um 17:49 schrieb Rob Clark: >> >> On Sat, Nov 5, 2016 at 12:38 PM, Eric Engestrom wrote: >>> >>> On Saturday, 2016-11-05 13:11:36 +0100, Christian König wrote: Am 05.11.2016 um 02:33 schrieb Eric Engestrom: >

[PATCH] drm: move allocation out of drm_get_format_name()

2016-11-05 Thread Eric Engestrom
On Saturday, 2016-11-05 13:11:36 +0100, Christian König wrote: > Am 05.11.2016 um 02:33 schrieb Eric Engestrom: > > +typedef char drm_format_name_buf[32]; > > Please don't use a typedef for this, just define the maximum size of > characters the function might write somewhere. > > See the kernel

[PATCH] drm: move allocation out of drm_get_format_name()

2016-11-05 Thread Thomas Hellstrom
For the vmwgfx part: Acked-by: Thomas Hellstrom On 11/05/2016 08:33 AM, Eric Engestrom wrote: > Fixes: 90844f00049e9f42573fd31d7c32e8fd31d3fd07 > > drm: make drm_get_format_name thread-safe > > Signed-off-by: Eric Engestrom > [danvet: Clarify that the returned pointer must be

[PATCH] drm: move allocation out of drm_get_format_name()

2016-11-05 Thread Christian König
Am 05.11.2016 um 02:33 schrieb Eric Engestrom: > +typedef char drm_format_name_buf[32]; Please don't use a typedef for this, just define the maximum size of characters the function might write somewhere. See the kernel coding style as well: > In general, a pointer, or a struct that has elements

[PATCH] drm: move allocation out of drm_get_format_name()

2016-11-05 Thread Rob Clark
On Sat, Nov 5, 2016 at 12:38 PM, Eric Engestrom wrote: > On Saturday, 2016-11-05 13:11:36 +0100, Christian König wrote: >> Am 05.11.2016 um 02:33 schrieb Eric Engestrom: >> > +typedef char drm_format_name_buf[32]; >> >> Please don't use a typedef for this, just define the maximum size of >>

[PATCH] drm: move allocation out of drm_get_format_name()

2016-11-05 Thread Eric Engestrom
Fixes: 90844f00049e9f42573fd31d7c32e8fd31d3fd07 drm: make drm_get_format_name thread-safe Signed-off-by: Eric Engestrom [danvet: Clarify that the returned pointer must be freed with kfree().] Signed-off-by: Daniel Vetter Suggested-by: Ville Syrjälä Signed-off-by: Eric