summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_unit.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-14 06:51:29 +0000
committerphk <phk@FreeBSD.org>2005-03-14 06:51:29 +0000
commit466fb85e71ac2e01a727b9dbbfd530093479f4d2 (patch)
treea1308342142e7c99bd3090bc2b17a9533a74dc57 /sys/kern/subr_unit.c
parentebc7aa2a14fe61ab205a6ffa8fc80e0f250f11df (diff)
downloadFreeBSD-src-466fb85e71ac2e01a727b9dbbfd530093479f4d2.zip
FreeBSD-src-466fb85e71ac2e01a727b9dbbfd530093479f4d2.tar.gz
Remove debugging printfs.
Diffstat (limited to 'sys/kern/subr_unit.c')
-rw-r--r--sys/kern/subr_unit.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c
index 0bf0ec9..910020d 100644
--- a/sys/kern/subr_unit.c
+++ b/sys/kern/subr_unit.c
@@ -199,7 +199,6 @@ struct unrhdr {
struct mtx *mtx;
};
-static void print_unrhdr(struct unrhdr *uh);
#if defined(DIAGNOSTIC) || !defined(_KERNEL)
/*
@@ -311,7 +310,6 @@ new_unrhdr(int low, int high, struct mtx *mutex)
uh->first = 0;
uh->last = 1 + (high - low);
check_unrhdr(uh, __LINE__);
-printf("NEW_UNRHDR %x-%x -> %p\n", low, high, uh);
return (uh);
}
@@ -564,11 +562,8 @@ alloc_unrl(struct unrhdr *uh)
* We can always allocate from the first list element, so if we have
* nothing on the list, we must have run out of unit numbers.
*/
- if (up == NULL) {
-printf("Out of units %p\n", uh);
-print_unrhdr(uh);
+ if (up == NULL)
return (-1);
- }
KASSERT(up->ptr != uh, ("UNR first element is allocated"));
@@ -730,6 +725,8 @@ free_unr(struct unrhdr *uh, u_int item)
Free(p2);
}
+#ifndef _KERNEL /* USERLAND test driver */
+
/*
* Simple stochastic test driver for the above functions
*/
@@ -778,8 +775,6 @@ print_unrhdr(struct unrhdr *uh)
}
}
-#ifndef _KERNEL /* USERLAND test driver */
-
/* Number of unrs to test */
#define NN 10000
OpenPOWER on IntegriCloud