diff options
author | H. Peter Anvin <hpa@zytor.com> | 2014-04-30 14:22:19 -0700 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-21 17:59:31 +0100 |
commit | 8c8e31f98cae35666e0e619115ab1e1fc80b1835 (patch) | |
tree | 7721c30a260b5b4e966ea2f507686d6b5e878f28 /include/asm-generic/word-at-a-time.h | |
parent | 68813d8f7e4554f5e2a97e66c4cb7dcacfcc6ade (diff) |
word-at-a-time: simplify big-endian zero_bytemask macrov3.10/topic/arm64-be
This is simpler and cleaner. Depending on architecture, a smart
compiler may or may not generate the same code.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 789ce9dca8007ab5d7c72b9a174a29243817ac32)
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/asm-generic/word-at-a-time.h')
-rw-r--r-- | include/asm-generic/word-at-a-time.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/word-at-a-time.h b/include/asm-generic/word-at-a-time.h index d96deb443f18..94f9ea8abcae 100644 --- a/include/asm-generic/word-at-a-time.h +++ b/include/asm-generic/word-at-a-time.h @@ -50,7 +50,7 @@ static inline bool has_zero(unsigned long val, unsigned long *data, const struct } #ifndef zero_bytemask -#define zero_bytemask(mask) (~0ul << __fls(mask) << 1) +#define zero_bytemask(mask) (~1ul << __fls(mask)) #endif #endif /* _ASM_WORD_AT_A_TIME_H */ |