Skip to contentSkip to conversation

powerpc: delete redundant conversion

PATCH New Qing Wang 1 participant 1 message Feb 9, 2022

Subsystems (2)
lore
Share & tools
lore

Qing Wang

author
#0 lore raw

PATCH 1/1 powerpc: delete redundant conversion

From: Wang Qing <[email protected]>

do_div() does a 64-by-32 division
No need to transform gpt->ipb_freq to u64

---
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1 -1
index f862b48..0cb2482
@@ -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);
Signature · 1 line
2.7.4