lkml.org 
[lkml]   [2013]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/7] tidspbridge: convert to idr_alloc()
On Tue, Mar 05, 2013 at 12:02:51PM -0800, Tejun Heo wrote:
> idr_get_new*() and friends are about to be deprecated. Convert to the
> new idr_alloc() interface.
>
> There are some peculiarities and possible bugs in the converted
> functions. This patch preserves those.
>
> * drv_insert_node_res_element() returns -ENOMEM on alloc failure,
> -EFAULT if id space is exhausted. -EFAULT is at best misleading.
>
> * drv_proc_insert_strm_res_element() is even weirder. It returns
> -EFAULT if kzalloc() fails, -ENOMEM if idr preloading fails and
> -EPERM if id space is exhausted. What's going on here?
>
> * drv_proc_insert_strm_res_element() doesn't free *pstrm_res after
> failure.
>
> Only compile tested.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
> Cc: Rene Sapiens <rene.sapiens@ti.com>
> Cc: Armando Uribe <x0095078@ti.com>
> Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
> ---
> drivers/staging/tidspbridge/rmgr/drv.c | 70 +++++++++++++---------------------
> 1 file changed, 26 insertions(+), 44 deletions(-)

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-03-05 23:21    [W:0.053 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site