diff options
author | Wang Qing <wangqing@vivo.com> | 2022-02-09 00:34:55 -0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-04 19:37:46 +1000 |
commit | f44cf716e46c2786a9f4ba26a78705b42412983c (patch) | |
tree | 5774952659100c21811d5b6b99104e1277a98934 /arch/powerpc/platforms | |
parent | dcbff9ad418497c2608d4b4d9423efc8e87e130e (diff) | |
download | lwn-f44cf716e46c2786a9f4ba26a78705b42412983c.tar.gz lwn-f44cf716e46c2786a9f4ba26a78705b42412983c.zip |
powerpc/5xx: Drop unnecessary cast
do_div() does a 64-by-32 division, the 2nd parameter is a u32.
gbp->ipb_freq is already a u32, there's no need to transform it to u64
before passing it to do_div().
Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Add some detail to change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1644395696-3545-1-git-send-email-wangqing@vivo.com
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index f862b48b4824..0cb248269db7 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c @@ -502,7 +502,7 @@ u64 mpc52xx_gpt_timer_period(struct mpc52xx_gpt_priv *gpt) if (prescale == 0) prescale = 0x10000; period = period * prescale * 1000000000ULL; - do_div(period, (u64)gpt->ipb_freq); + do_div(period, gpt->ipb_freq); return period; } EXPORT_SYMBOL(mpc52xx_gpt_timer_period); |