Explorar o código

Blackfin: fix typo in hweight asm

Run ONES on the incoming value rather than random garbage.  This fixes
random crashes with some networking code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger %!s(int64=15) %!d(string=hai) anos
pai
achega
a13265af99
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/blackfin/include/asm/bitops.h

+ 1 - 1
arch/blackfin/include/asm/bitops.h

@@ -119,7 +119,7 @@ static inline unsigned int hweight32(unsigned int w)
 {
 	unsigned int res;
 
-	__asm__ ("%0.l = ONES %0;"
+	__asm__ ("%0.l = ONES %1;"
 		"%0 = %0.l (Z);"
 		: "=d" (res) : "d" (w));
 	return res;