[PATCH] Whitespace and CodingStyle cleanup for lib/idr.c

Cleanup trailing whitespace, blank lines, CodingStyle issues etc, for
lib/idr.c

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Jesper Juhl
2005-10-30 15:02:14 -08:00
committed by Linus Torvalds
parent 850b924792
commit e15ae2dd3e

View File

@@ -225,6 +225,7 @@ build_up:
int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)
{
int rv;
rv = idr_get_new_above_int(idp, ptr, starting_id);
/*
* This is a cheap hack until the IDR code can be fixed to
@@ -259,6 +260,7 @@ EXPORT_SYMBOL(idr_get_new_above);
int idr_get_new(struct idr *idp, void *ptr, int *id)
{
int rv;
rv = idr_get_new_above_int(idp, ptr, 0);
/*
* This is a cheap hack until the IDR code can be fixed to
@@ -308,10 +310,9 @@ static void sub_remove(struct idr *idp, int shift, int id)
}
if (!*paa)
idp->layers = 0;
} else {
} else
idr_remove_warning(id);
}
}
/**
* idr_remove - remove the given id and free it's slot
@@ -326,8 +327,7 @@ void idr_remove(struct idr *idp, int id)
id &= MAX_ID_MASK;
sub_remove(idp, (idp->layers - 1) * IDR_BITS, id);
if ( idp->top && idp->top->count == 1 &&
(idp->layers > 1) &&
if (idp->top && idp->top->count == 1 && (idp->layers > 1) &&
idp->top->ary[0]) { // We can drop a layer
p = idp->top->ary[0];
@@ -337,7 +337,6 @@ void idr_remove(struct idr *idp, int id)
--idp->layers;
}
while (idp->id_free_cnt >= IDR_FREE_MAX) {
p = alloc_layer(idp);
kmem_cache_free(idr_layer_cache, p);
return;
@@ -391,8 +390,8 @@ void *idr_find(struct idr *idp, int id)
}
EXPORT_SYMBOL(idr_find);
static void idr_cache_ctor(void * idr_layer,
kmem_cache_t *idr_layer_cache, unsigned long flags)
static void idr_cache_ctor(void * idr_layer, kmem_cache_t *idr_layer_cache,
unsigned long flags)
{
memset(idr_layer, 0, sizeof(struct idr_layer));
}