src/dpdk/drivers/net/bnxt/tf_core/bitalloc.c
static int
ba_fls(bitalloc_word_t v)
{
	int c = 32;

	if (!v)
		return 0;

	if (!(v & 0xFFFF0000u)) {
		v <<= 16;
		c -= 16;
	}
	if (!(v & 0xFF000000u)) {
		v <<= 8;
		c -= 8;
	}
	if (!(v & 0xF0000000u)) {
		v <<= 4;
		c -= 4;
	}
	if (!(v & 0xC0000000u)) {
		v <<= 2;
		c -= 2;
	}
	if (!(v & 0x80000000u)) {
		v <<= 1;
		c -= 1;
	}

	return c;
}
/* Finds the last bit set plus 1, equivalent to gcc __builtin_fls */
Finds the last bit set plus 1, equivalent to gcc __builtin_fls
Finds the last bit set plus 1 equivalent to gcc __builtin_fls
static int
ba_fls(bitalloc_word_t v)
{
	int c = 32;
	if (!v)
		return 0;
	if (!(v & 0xFFFF0000u)) {
		v <<= 16;
		c -= 16;
	}
	if (!(v & 0xFF000000u)) {
		v <<= 8;
		c -= 8;
	}
	if (!(v & 0xF0000000u)) {
		v <<= 4;
		c -= 4;
	}
	if (!(v & 0xC0000000u)) {
		v <<= 2;
		c -= 2;
	}
	if (!(v & 0x80000000u)) {
		v <<= 1;
		c -= 1;
	}
	return c;
}
static int ba_fls ( bitalloc_word_t v ) { int c = 32 ; if ( ! v ) return 0 ; if ( ! ( v & 0xFFFF0000u ) ) { v <<= 16 ; c -= 16 ; } if ( ! ( v & 0xFF000000u ) ) { v <<= 8 ; c -= 8 ; } if ( ! ( v & 0xF0000000u ) ) { v <<= 4 ; c -= 4 ; } if ( ! ( v & 0xC0000000u ) ) { v <<= 2 ; c -= 2 ; } if ( ! ( v & 0x80000000u ) ) { v <<= 1 ; c -= 1 ; } return c ; }
Finds the last bit set plus 1, equivalent to gcc __builtin_fls
Finds the last bit set plus 1 equivalent to gcc __builtin_fls