diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 99f2ac30b1d9bcd6e69b705ebfb197cff4ed7dd4..030a98f0c452892e8298d955030da7e0254be221 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -206,10 +206,7 @@ static inline int get_count_order_long(unsigned long l)
 {
 	if (l == 0UL)
 		return -1;
-	else if (l & (l - 1UL))
-		return (int)fls_long(l);
-	else
-		return (int)fls_long(l) - 1;
+	return (int)fls_long(--l);
 }
 
 /**