From 107735eaea0f48c1f5bfc0a6ca82f1879a850b98 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 1 Aug 2017 22:47:26 +0200 Subject: routingtable: unbloat BUG() Really isn't necessary. --- src/routingtable.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/routingtable.c') diff --git a/src/routingtable.c b/src/routingtable.c index a6abb61..8db3efe 100644 --- a/src/routingtable.c +++ b/src/routingtable.c @@ -119,18 +119,17 @@ static void walk_remove_by_peer(struct routing_table_node __rcu **top, struct wi #undef deref #undef push -static inline unsigned int fls128(u64 a, u64 b) +static __always_inline unsigned int fls128(u64 a, u64 b) { return a ? fls64(a) + 64 : fls64(b); } -static inline u8 common_bits(const struct routing_table_node *node, const u8 *key, u8 bits) +static __always_inline u8 common_bits(const struct routing_table_node *node, const u8 *key, u8 bits) { if (bits == 32) return 32 - fls(be32_to_cpu(*(const __be32 *)node->bits ^ *(const __be32 *)key)); else if (bits == 128) return 128 - fls128(be64_to_cpu(*(const __be64 *)&node->bits[0] ^ *(const __be64 *)&key[0]), be64_to_cpu(*(const __be64 *)&node->bits[8] ^ *(const __be64 *)&key[8])); - BUG(); return 0; } -- cgit v1.2.3-59-g8ed1b