[PATCH v2] drm/gem: fix not to assign error value to gem name

2013-06-28 Thread 김승우
Hello, Chris, On 2013? 06? 27? 17:31, Chris Wilson wrote: > On Thu, Jun 27, 2013 at 08:58:33AM +0900, Seung-Woo Kim wrote: >> From: YoungJun Cho >> >> If idr_alloc() is failed, obj->name can be error value. Also >> it cleans up duplicated flink processing code. >> >> This regression has been intr

[PATCH v2] drm/gem: fix not to assign error value to gem name

2013-06-28 Thread Chris Wilson
On Fri, Jun 28, 2013 at 01:15:43PM +0900, ??? wrote: > > Being pedantic, ret == 0 is also an error - but a programming error > > leading to an object leak. BUG_ON(ret == 0) ? > > > > It seems that idr_alloc() with start id 1 does not return 0, so IMHO, > ret == 0 can be ignored here. Yes, it is

Re: [PATCH v2] drm/gem: fix not to assign error value to gem name

2013-06-28 Thread Chris Wilson
On Fri, Jun 28, 2013 at 01:15:43PM +0900, 김승우 wrote: > > Being pedantic, ret == 0 is also an error - but a programming error > > leading to an object leak. BUG_ON(ret == 0) ? > > > > It seems that idr_alloc() with start id 1 does not return 0, so IMHO, > ret == 0 can be ignored here. Yes, it is

Re: [PATCH v2] drm/gem: fix not to assign error value to gem name

2013-06-27 Thread 김승우
Hello, Chris, On 2013년 06월 27일 17:31, Chris Wilson wrote: > On Thu, Jun 27, 2013 at 08:58:33AM +0900, Seung-Woo Kim wrote: >> From: YoungJun Cho >> >> If idr_alloc() is failed, obj->name can be error value. Also >> it cleans up duplicated flink processing code. >> >> This regression has been intr

[PATCH v2] drm/gem: fix not to assign error value to gem name

2013-06-27 Thread Chris Wilson
On Thu, Jun 27, 2013 at 08:58:33AM +0900, Seung-Woo Kim wrote: > From: YoungJun Cho > > If idr_alloc() is failed, obj->name can be error value. Also > it cleans up duplicated flink processing code. > > This regression has been introduced in > > commit 2e928815c1886fe628ed54623aa98d0889cf5509 >

[PATCH v2] drm/gem: fix not to assign error value to gem name

2013-06-27 Thread Seung-Woo Kim
From: YoungJun Cho If idr_alloc() is failed, obj->name can be error value. Also it cleans up duplicated flink processing code. This regression has been introduced in commit 2e928815c1886fe628ed54623aa98d0889cf5509 Author: Tejun Heo Date: Wed Feb 27 17:04:08 2013 -0800 drm: convert to id

Re: [PATCH v2] drm/gem: fix not to assign error value to gem name

2013-06-27 Thread Chris Wilson
On Thu, Jun 27, 2013 at 08:58:33AM +0900, Seung-Woo Kim wrote: > From: YoungJun Cho > > If idr_alloc() is failed, obj->name can be error value. Also > it cleans up duplicated flink processing code. > > This regression has been introduced in > > commit 2e928815c1886fe628ed54623aa98d0889cf5509 >

[PATCH v2] drm/gem: fix not to assign error value to gem name

2013-06-26 Thread Seung-Woo Kim
From: YoungJun Cho If idr_alloc() is failed, obj->name can be error value. Also it cleans up duplicated flink processing code. This regression has been introduced in commit 2e928815c1886fe628ed54623aa98d0889cf5509 Author: Tejun Heo Date: Wed Feb 27 17:04:08 2013 -0800 drm: convert to id