projects
/
platform
/
kernel
/
opensbi-spacemit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5f9104
)
include: sbi_bitops: Remove dead shift assignment in ffs/fls
author
Tobias Klauser
<tklauser@distanz.ch>
Tue, 7 Jul 2020 09:56:55 +0000
(11:56 +0200)
committer
Anup Patel
<anup@brainfault.org>
Tue, 14 Jul 2020 11:33:30 +0000
(17:03 +0530)
The value assigned to x by the shift assignment in the last if block of
ffs/fls is never read. Remove it.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
include/sbi/sbi_bitops.h
patch
|
blob
|
history
diff --git
a/include/sbi/sbi_bitops.h
b/include/sbi/sbi_bitops.h
index
d920086
..
879430d
100644
(file)
--- a/
include/sbi/sbi_bitops.h
+++ b/
include/sbi/sbi_bitops.h
@@
-66,10
+66,8
@@
static inline int ffs(int x)
x >>= 2;
r += 2;
}
- if (!(x & 1)) {
- x >>= 1;
+ if (!(x & 1))
r += 1;
- }
return r;
}
@@
-148,10
+146,8
@@
static inline int fls(int x)
x <<= 2;
r -= 2;
}
- if (!(x & 0x80000000u)) {
- x <<= 1;
+ if (!(x & 0x80000000u))
r -= 1;
- }
return r;
}