Skip to contentSkip to conversation

m68k: define __fls (was: Re: Yet more ARM breakage in linux-next (fwd))

PATCH Geert Uytterhoeven 1 participant 1 message Dec 5, 2008

lore
Share & tools
lore
#0 lore raw

---------- Forwarded message ----------
Date: Fri, 5 Dec 2008 00:42:27 +1030
From: Rusty Russell <[email protected]>
To: Geert Uytterhoeven <[email protected]>
Cc: Andrew Morton <[email protected]>,
Russell King <[email protected]>, [email protected]
Subject: Re: Yet more ARM breakage in linux-next

Quoted 1 line · On Thursday 04 December 2008 19:48:06 Geert Uytterhoeven wrote:

Also broke m68k (a bit more hidden due to other build failures).

And m68knommu has similar issues.

Here's what I have for m68k for tomorrow's linux-next. Please steal.

m68k: define __fls

Like fls, but can't be handed 0 and returns the bit number.

(I broke this arch in linux-next by using __fls in generic code).

include/asm-m68k/bitops.h +5 -0
@@ -315,6 +315,11 @@ static inline int fls(int x)
 	return 32 - cnt;
 }
 
+static inline int __fls(int x)
+{
+	return fls(x) - 1;
+}
+
 #include <asm-generic/bitops/fls64.h>
 #include <asm-generic/bitops/sched.h>
 #include <asm-generic/bitops/hweight.h>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/