diff options
author | dillon <dillon@FreeBSD.org> | 2003-01-11 01:09:51 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2003-01-11 01:09:51 +0000 |
commit | 7060fb8de0e3d82d1352b6ba4c60da0059ec8837 (patch) | |
tree | fd283a2e3997739d34987d9cc91ee671ead65731 /sys/sys/blist.h | |
parent | 3155dbd99ce81dc4841ea2380c12068dfb497612 (diff) | |
download | FreeBSD-src-7060fb8de0e3d82d1352b6ba4c60da0059ec8837.zip FreeBSD-src-7060fb8de0e3d82d1352b6ba4c60da0059ec8837.tar.gz |
Remove all use of the LOG2() macro/inline, undoing some non-optimal cruft
that crept in recently. GCC will optimize the divides and multiplies for us.
Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after: 1 day
Diffstat (limited to 'sys/sys/blist.h')
-rw-r--r-- | sys/sys/blist.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/sys/sys/blist.h b/sys/sys/blist.h index d426e48..c81439c 100644 --- a/sys/sys/blist.h +++ b/sys/sys/blist.h @@ -33,20 +33,6 @@ typedef u_int32_t u_daddr_t; /* unsigned disk address */ -static __inline int -LOG2(u_daddr_t v) -{ - int i = -1; - - if (!v) - return(0); - while (v) { - i++; - v >>= 1; - } - return (i); -} - /* * blmeta and bl_bitmap_t MUST be a power of 2 in size. */ @@ -69,9 +55,7 @@ typedef struct blist { } *blist_t; #define BLIST_META_RADIX 16 -#define BLIST_META_RADIX_SHIFT LOG2(BLIST_META_RADIX) #define BLIST_BMAP_RADIX (sizeof(u_daddr_t)*8) -#define BLIST_BMAP_RADIX_SHIFT LOG2(BLIST_BMAP_RADIX) #define BLIST_MAX_ALLOC BLIST_BMAP_RADIX |