Skip to contentSkip to conversation

Revert "net: ethernet: cavium: use div64_u64() instead of do_div()"

PATCH Applied Jakub Kicinski 2 participants 2 messages Feb 11, 2022 – Feb 12, 2022

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 Revert "net: ethernet: cavium: use div64_u64() instead of do_div()"

This reverts commit 038fcdaf0470de89619bc4cc199e329391e6566c.

Christophe points out div64_u64() and do_div() have different calling conventions. One updates the param, the other returns the result.

Fixes 038fcdaf0470 ("net: ethernet: cavium: use div64_u64() instead of do_div()")
---
 drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/cavium/liquidio/lio_main.c +2 -2
index 8e07192e409f..ba28aa444e5a 100644
@@ -1539,7 +1539,7 @@ static int liquidio_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
 	 * compute the delta in terms of coprocessor clocks.
 	 */
 	delta = (u64)ppb << 32;
-	div64_u64(delta, oct->coproc_clock_rate);
+	do_div(delta, oct->coproc_clock_rate);
 
 	spin_lock_irqsave(&lio->ptp_lock, flags);
 	comp = lio_pci_readq(oct, CN6XXX_MIO_PTP_CLOCK_COMP);
@@ -1672,7 +1672,7 @@ static void liquidio_ptp_init(struct octeon_device *oct)
 	u64 clock_comp, cfg;
 
 	clock_comp = (u64)NSEC_PER_SEC << 32;
-	div64_u64(clock_comp, oct->coproc_clock_rate);
+	do_div(clock_comp, oct->coproc_clock_rate);
 	lio_pci_writeq(oct, clock_comp, CN6XXX_MIO_PTP_CLOCK_COMP);
 
 	/* Enable */
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 6 lines · On Thu, 10 Feb 2022 18:05:44 -0800 you wrote:

This reverts commit 038fcdaf0470de89619bc4cc199e329391e6566c.

Christophe points out div64_u64() and do_div() have different calling conventions. One updates the param, the other returns the result.

Quoted 6 lines
Fixes 038fcdaf0470 ("net: ethernet: cavium: use div64_u64() instead of do_div()")

[...]

Here is the summary with links:
- [net-next] Revert "net: ethernet: cavium: use div64_u64() instead of do_div()"

    https://git.kernel.org/netdev/net-next/c/f126ec9d6e57

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html