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
This commit is contained in:
parent
dcbff9ad41
commit
f44cf716e4
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user