Commit 0229cc25 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] work around gcc bug in bitmap.c

gcc miscompiles this. Scary.
parent 7685e7ed
......@@ -51,8 +51,9 @@ EXPORT_SYMBOL(bitmap_equal);
void bitmap_complement(unsigned long *bitmap, int bits)
{
int k;
int nr = BITS_TO_LONGS(bits);
for (k = 0; k < BITS_TO_LONGS(bits); ++k)
for (k = 0; k < nr; ++k)
bitmap[k] = ~bitmap[k];
}
EXPORT_SYMBOL(bitmap_complement);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment