Re: [TRIVIAL] Re: UP went into unexpected trashing

Dipankar Sarma (dipankar@gamebox.net)
Sat, 9 Nov 2002 01:23:36 +0530


On Fri, Nov 08, 2002 at 04:40:13PM +0100, Petr Vandrovec wrote:
> On 8 Nov 02 at 19:33, Rusty Trivial Russell wrote:
>
> So maybe callers should just treat any return value >= size as "not found",
> leaving older smaller code in place.

Or add a check in there. I can't figure out a way to avoid the extra
conditional branch anyway :)

Thanks
Dipankar

diff -urN linux-2.5.46-base/include/asm-i386/bitops.h linux-2.5.46-misc/include/asm-i386/bitops.h
--- linux-2.5.46-base/include/asm-i386/bitops.h Sat Sep 28 03:20:22 2002
+++ linux-2.5.46-misc/include/asm-i386/bitops.h Sat Nov 9 01:08:56 2002
@@ -317,7 +317,7 @@
"addl %%edi,%%eax"
:"=a" (res), "=&c" (d0), "=&D" (d1)
:"1" ((size + 31) >> 5), "2" (addr), "b" (addr));
- return res;
+ return (size > res) ? res : size;
}

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