Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3ffe666 authored by Andrew Perepechko's avatar Andrew Perepechko Committed by Greg Kroah-Hartman
Browse files

staging: lustre: lprocfs: implement log2 using bitops

parent b59d812d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1472,10 +1472,10 @@ EXPORT_SYMBOL(lprocfs_oh_tally);

void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value)
{
	unsigned int val;
	unsigned int val = 0;

	for (val = 0; ((1 << val) < value) && (val <= OBD_HIST_MAX); val++)
		;
	if (likely(value != 0))
		val = min(fls(value - 1), OBD_HIST_MAX);

	lprocfs_oh_tally(oh, val);
}