idr: error checking factorization
Do some code factorization in the return code analysis. Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Cc: Manfred Spraul <manfred@colorfullife.com> Cc: Jim Houston <jim.houston@comcast.net> Cc: Pierre Peiffer <peifferp@gmail.com> Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
f098ad655f
commit
944ca05c7b
@@ -73,6 +73,12 @@ struct idr {
|
||||
}
|
||||
#define DEFINE_IDR(name) struct idr name = IDR_INIT(name)
|
||||
|
||||
/* Actions to be taken after a call to _idr_sub_alloc */
|
||||
#define IDR_NEED_TO_GROW -2
|
||||
#define IDR_NOMORE_SPACE -3
|
||||
|
||||
#define _idr_rc_to_errno(rc) ((rc) == -1 ? -EAGAIN : -ENOSPC)
|
||||
|
||||
/*
|
||||
* This is what we export.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user