src/dpdk/drivers/bus/dpaa/include/fsl_qman.h
static inline int qm_fqd_taildrop_set(struct qm_fqd_taildrop *td, u32 val,
				      int roundup)
{
	u32 e = 0;
	int oddbit = 0;

	if (val > 0xe0000000)
		return -ERANGE;
	while (val > 0xff) {
		oddbit = val & 1;
		val >>= 1;
		e++;
		if (roundup && oddbit)
			val++;
	}
	td->exp = e;
	td->mant = val;
	return 0;
}
/* convert a threshold value into mant+exp representation */
convert a threshold value into mant+exp representation
convert a threshold value into mant + exp representation
static inline int qm_fqd_taildrop_set(struct qm_fqd_taildrop *td, u32 val,
				      int roundup)
{
	u32 e = 0;
	int oddbit = 0;
	if (val > 0xe0000000)
		return -ERANGE;
	while (val > 0xff) {
		oddbit = val & 1;
		val >>= 1;
		e++;
		if (roundup && oddbit)
			val++;
	}
	td->exp = e;
	td->mant = val;
	return 0;
}
static inline int qm_fqd_taildrop_set ( struct qm_fqd_taildrop * td , u32 val , int roundup ) { u32 e = 0 ; int oddbit = 0 ; if ( val > 0xe0000000 ) return - ERANGE ; while ( val > 0xff ) { oddbit = val & 1 ; val >>= 1 ; e ++ ; if ( roundup && oddbit ) val ++ ; } td -> exp = e ; td -> mant = val ; return 0 ; }
convert a threshold value into mant+exp representation
convert a threshold value into mant + exp representation