diff options
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/stripe/g_stripe.c | 2 | ||||
-rw-r--r-- | sys/geom/stripe/g_stripe.h | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c index 3f66102..eea2ad1 100644 --- a/sys/geom/stripe/g_stripe.c +++ b/sys/geom/stripe/g_stripe.c @@ -792,7 +792,7 @@ g_stripe_create(struct g_class *mp, const struct g_stripe_metadata *md, sc->sc_id = md->md_id; sc->sc_stripesize = md->md_stripesize; - sc->sc_stripebits = BITCOUNT(sc->sc_stripesize - 1); + sc->sc_stripebits = bitcount32(sc->sc_stripesize - 1); sc->sc_ndisks = md->md_all; sc->sc_disks = malloc(sizeof(struct g_consumer *) * sc->sc_ndisks, M_STRIPE, M_WAITOK | M_ZERO); diff --git a/sys/geom/stripe/g_stripe.h b/sys/geom/stripe/g_stripe.h index b343e23..1b6e2e5 100644 --- a/sys/geom/stripe/g_stripe.h +++ b/sys/geom/stripe/g_stripe.h @@ -120,10 +120,4 @@ stripe_metadata_decode(const u_char *data, struct g_stripe_metadata *md) md->md_provsize = le64dec(data + 64); } -#ifndef BITCOUNT -#define BITCOUNT(x) (((BX_(x) + (BX_(x) >> 4)) & 0x0F0F0F0F) % 255) -#define BX_(x) ((x) - (((x) >> 1) & 0x77777777) - \ - (((x) >> 2) & 0x33333333) - (((x) >> 3) & 0x11111111)) -#endif - #endif /* _G_STRIPE_H_ */ |