projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c68458
)
math64: Tidy up mul_u64_u32_shr()
author
Adrian Hunter
<adrian.hunter@intel.com>
Mon, 25 Mar 2024 06:40:08 +0000
(08:40 +0200)
committer
Thomas Gleixner
<tglx@linutronix.de>
Mon, 8 Apr 2024 13:03:06 +0000
(15:03 +0200)
Put together declaration and initialization of local variables.
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link:
https://lore.kernel.org/r/20240325064023.2997-5-adrian.hunter@intel.com
include/linux/math64.h
patch
|
blob
|
history
diff --git
a/include/linux/math64.h
b/include/linux/math64.h
index bf74478926d4adf2c30349202133ccb73381723d..fd13622b2056e6aac4ba2d826fccc534d7363eeb 100644
(file)
--- a/
include/linux/math64.h
+++ b/
include/linux/math64.h
@@
-179,16
+179,12
@@
static __always_inline u64 mul_u64_u64_shr(u64 a, u64 mul, unsigned int shift)
#ifndef mul_u64_u32_shr
static __always_inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift)
{
- u32 ah
, al
;
+ u32 ah
= a >> 32, al = a
;
u64 ret;
- al = a;
- ah = a >> 32;
-
ret = mul_u32_u32(al, mul) >> shift;
if (ah)
ret += mul_u32_u32(ah, mul) << (32 - shift);
-
return ret;
}
#endif /* mul_u64_u32_shr */