Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109469689
D46022.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
998 B
Referenced Files
None
Subscribers
None
D46022.diff
View Options
diff --git a/sys/dev/axgbe/xgbe-sysctl.c b/sys/dev/axgbe/xgbe-sysctl.c
--- a/sys/dev/axgbe/xgbe-sysctl.c
+++ b/sys/dev/axgbe/xgbe-sysctl.c
@@ -244,22 +244,6 @@
return(-EINVAL);
}
-static inline unsigned
-fls_long(unsigned long l)
-{
-
- if (sizeof(l) == 4)
- return (fls(l));
- return (fls64(l));
-}
-
-static inline __attribute__((const))
-unsigned long __rounddown_pow_of_two(unsigned long n)
-{
-
- return (1UL << (fls_long(n) - 1));
-}
-
static inline int
get_ubuf(struct sysctl_req *req, char *ubuf)
{
@@ -1049,12 +1033,12 @@
return (-EINVAL);
}
- rx = __rounddown_pow_of_two(sys_op->rx_pending);
+ rx = rounddown_pow_of_two(sys_op->rx_pending);
if (rx != sys_op->rx_pending)
axgbe_printf(1, "rx ring param rounded to power of 2: %u\n",
rx);
- tx = __rounddown_pow_of_two(sys_op->tx_pending);
+ tx = rounddown_pow_of_two(sys_op->tx_pending);
if (tx != sys_op->tx_pending)
axgbe_printf(1, "tx ring param rounded to power of 2: %u\n",
tx);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 6, 11:54 AM (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16493044
Default Alt Text
D46022.diff (998 B)
Attached To
Mode
D46022: xgbe: use standard rounddown_pow_of_two
Attached
Detach File
Event Timeline
Log In to Comment