[patch V4 02/31] bitops: Include generic parity.h in some architectures' bitops.h

2016-05-11 Thread zengzhaoxiu
From: Zhaoxiu Zeng Simply use the generic version. Signed-off-by: Zhaoxiu Zeng Acked-by: Hans-Christian Noren Egtvedt [for avr32] --- arch/arc/include/asm/bitops.h | 1 + arch/arm/include/asm/bitops.h | 1 + arch/arm64/include/asm/bitops.h| 1 + arch/avr32/include/asm/bitops.h

[patch V4] lib: GCD: Use binary GCD algorithm instead of Euclidean

2016-05-06 Thread zengzhaoxiu
From: Zhaoxiu Zeng The binary GCD algorithm is based on the following facts: 1. If a and b are all evens, then gcd(a,b) = 2 * gcd(a/2, b/2) 2. If a is even and b is odd, then gcd(a,b) = gcd(a/2, b) 3. If a and b are all odds, then gcd(a,b) = gcd((a-b)/2, b) = gcd((a+b)/2,

[PATCH V3 00/29] bitops: add parity functions

2016-04-13 Thread zengzhaoxiu
From: Zhaoxiu Zeng When I do "grep parity -r linux", I found many parity calculations distributed in many drivers. This patch series does: 1. provide generic and architecture-specific parity calculations 2. remove drivers' local parity calculations, use bitops' parity functions instead

[PATCH V3 00/29] bitops: add parity functions

2016-04-13 Thread zengzhaoxiu
From: Zhaoxiu Zeng When I do "grep parity -r linux", I found many parity calculations distributed in many drivers. This patch series does: 1. provide generic and architecture-specific parity calculations 2. remove drivers' local parity calculations, use bitops' parity functions instead

[PATCH V3 02/29] Include generic parity.h in some architectures' bitops.h

2016-04-13 Thread zengzhaoxiu
From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- arch/arc/include/asm/bitops.h | 1 + arch/arm/include/asm/bitops.h | 1 + arch/arm64/include/asm/bitops.h| 1 + arch/avr32/include/asm/bitops.h| 1 + arch/c6x/include/asm/bitops.h | 1 + arch/cris/include/asm/bitops.h

[PATCH v2 02/30] Include generic parity.h in some architectures' bitops.h

2016-04-06 Thread zengzhaoxiu
From: Zhaoxiu Zeng Use the generic version Signed-off-by: Zhaoxiu Zeng --- arch/arc/include/asm/bitops.h | 1 + arch/arm/include/asm/bitops.h | 1 + arch/arm64/include/asm/bitops.h| 1 + arch/avr32/include/asm/bitops.h| 1 + arch/c6x/include/asm/bitops.h | 1 + arch/cris