diff options
| author | Jan Beulich <[email protected]> | 2012-07-06 14:07:48 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2012-07-10 08:38:14 +0000 |
| commit | 1ba9a294141b106b7247649a5c3372d8284eca80 (patch) | |
| tree | cc99056968f74fb5ceaaae380548da3a72cd4f96 /fs/jbd2/commit.c | |
| parent | x86/copy_user_generic: Optimize copy_user_generic with CPU erms feature (diff) | |
| download | kernel-1ba9a294141b106b7247649a5c3372d8284eca80.tar.gz kernel-1ba9a294141b106b7247649a5c3372d8284eca80.zip | |
x86/mm/mtrr: Fix alignment determination in range_to_mtrr()
With the variable operated on being of "unsigned long" type,
neither ffs() nor fls() are suitable to use on them, as those
truncate their arguments to 32 bits. Using __ffs() and __fls()
respectively at once eliminates the need to subtract 1 from their
results.
Additionally, with the alignment value subsequently used as a
shift count, it must be enforced to be less than BITS_PER_LONG
(and on 64-bit there's no need for it to be any smaller).
Signed-off-by: Jan Beulich <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Yinghai Lu <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions
