Re: [PATCH 09/62] atm/nicstar: convert to idr_alloc()

2013-02-04 Thread chas williams - CONTRACTOR
On Mon, 4 Feb 2013 09:06:24 -0800 Tejun Heo wrote: > Hello, Chas. > > On Mon, Feb 04, 2013 at 09:04:10AM -0500, chas williams - CONTRACTOR wrote: > > I don't quite understand your comment. idr_pre_get() returns 0 in the > > case of failure. > > So, if you do the following, > > int id1 =

Re: [PATCH 09/62] atm/nicstar: convert to idr_alloc()

2013-02-04 Thread Tejun Heo
Hello, Chas. On Mon, Feb 04, 2013 at 09:04:10AM -0500, chas williams - CONTRACTOR wrote: > I don't quite understand your comment. idr_pre_get() returns 0 in the > case of failure. So, if you do the following, int id1 = 0, id2 = 0; if (!id1) err = idr_get_new_abo

Re: [PATCH 09/62] atm/nicstar: convert to idr_alloc()

2013-02-04 Thread chas williams - CONTRACTOR
I don't quite understand your comment. idr_pre_get() returns 0 in the case of failure. On Sat, 2 Feb 2013 17:20:10 -0800 Tejun Heo wrote: > Convert to the much saner new idr interface. The existing code looks > buggy to me - ID 0 is treated as no-ID but allocation specifies 0 as > lower limit

[PATCH 09/62] atm/nicstar: convert to idr_alloc()

2013-02-02 Thread Tejun Heo
Convert to the much saner new idr interface. The existing code looks buggy to me - ID 0 is treated as no-ID but allocation specifies 0 as lower limit and there's no error handling after parial success. This conversion keeps the bugs unchanged. Only compile tested. Signed-off-by: Tejun Heo Cc: