diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-08-29 09:30:41 +0200 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-08-29 09:31:47 +0200 | 
| commit | eebc57f73d42095b778e899f6aa90ad050c72655 (patch) | |
| tree | 2ba80c75e9284093e6d7606dbb1b6a4bb752a2a5 /lib/bitmap.c | |
| parent | d3a247bfb2c26f5b67367d58af7ad8c2efbbc6c1 (diff) | |
| parent | 2a4ab640d3c28c2952967e5f63ea495555bf2a5f (diff) | |
Merge branch 'for-ingo' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6 into x86/apic
Merge reason: the SFI (Simple Firmware Interface) feature in the ACPI
              tree needs this cleanup, pull it into the APIC branch as
	      well so that there's no interactions.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/bitmap.c')
| -rw-r--r-- | lib/bitmap.c | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/lib/bitmap.c b/lib/bitmap.c index 35a1f7ff4149..702565821c99 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -179,14 +179,16 @@ void __bitmap_shift_left(unsigned long *dst,  }  EXPORT_SYMBOL(__bitmap_shift_left); -void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, +int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,  				const unsigned long *bitmap2, int bits)  {  	int k;  	int nr = BITS_TO_LONGS(bits); +	unsigned long result = 0;  	for (k = 0; k < nr; k++) -		dst[k] = bitmap1[k] & bitmap2[k]; +		result |= (dst[k] = bitmap1[k] & bitmap2[k]); +	return result != 0;  }  EXPORT_SYMBOL(__bitmap_and); @@ -212,14 +214,16 @@ void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,  }  EXPORT_SYMBOL(__bitmap_xor); -void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, +int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,  				const unsigned long *bitmap2, int bits)  {  	int k;  	int nr = BITS_TO_LONGS(bits); +	unsigned long result = 0;  	for (k = 0; k < nr; k++) -		dst[k] = bitmap1[k] & ~bitmap2[k]; +		result |= (dst[k] = bitmap1[k] & ~bitmap2[k]); +	return result != 0;  }  EXPORT_SYMBOL(__bitmap_andnot); | 
