projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2baa609
)
axmap: clean up 'no bits to set' case
author
Jens Axboe
<axboe@kernel.dk>
Wed, 11 Jul 2018 14:34:06 +0000
(08:34 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 11 Jul 2018 14:34:06 +0000
(08:34 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/axmap.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/axmap.c
b/lib/axmap.c
index c29597f80e78748043b63db3756463596c164646..2a9463dc2fda9abbb0252a530fe476e2d526cfe0 100644
(file)
--- a/
lib/axmap.c
+++ b/
lib/axmap.c
@@
-237,10
+237,10
@@
static bool axmap_set_fn(struct axmap_level *al, unsigned long offset,
if (overlap) {
const int __bit = ffz(~overlap);
if (overlap) {
const int __bit = ffz(~overlap);
- if (__bit == bit)
+ nr_bits = __bit - bit;
+ if (!nr_bits)
return true;
return true;
- nr_bits = __bit - bit;
mask = bit_masks[nr_bits] << bit;
}
mask = bit_masks[nr_bits] << bit;
}