[PATCH v1 4/5] math64: Silence a clang -Wshorten-64-to-32 warning

Ian Rogers
2025-04-03T16:57:16Z

include/linux/math64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/math64.h b/include/linux/math64.h
index 6aaccc1626ab..f32fcb2a2331 100644
--- a/include/linux/math64.h
+++ b/include/linux/math64.h
@@ -179,7 +179,7 @@ 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 = a >> 32, al = a;
+ u32 ah = a >> 32, al = (u32)a;
u64 ret;

ret = mul_u32_u32(al, mul) >> shift;
--
2.49.0.504.g3bcea36a83-goog