Skip to content

Commit f126ec9

Browse files
committed
Revert "net: ethernet: cavium: use div64_u64() instead of do_div()"
This reverts commit 038fcda. Christophe points out div64_u64() and do_div() have different calling conventions. One updates the param, the other returns the result. Reported-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Fixes: 038fcda ("net: ethernet: cavium: use div64_u64() instead of do_div()") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c9ac080 commit f126ec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/cavium/liquidio/lio_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ static int liquidio_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
15391539
* compute the delta in terms of coprocessor clocks.
15401540
*/
15411541
delta = (u64)ppb << 32;
1542-
div64_u64(delta, oct->coproc_clock_rate);
1542+
do_div(delta, oct->coproc_clock_rate);
15431543

15441544
spin_lock_irqsave(&lio->ptp_lock, flags);
15451545
comp = lio_pci_readq(oct, CN6XXX_MIO_PTP_CLOCK_COMP);
@@ -1672,7 +1672,7 @@ static void liquidio_ptp_init(struct octeon_device *oct)
16721672
u64 clock_comp, cfg;
16731673

16741674
clock_comp = (u64)NSEC_PER_SEC << 32;
1675-
div64_u64(clock_comp, oct->coproc_clock_rate);
1675+
do_div(clock_comp, oct->coproc_clock_rate);
16761676
lio_pci_writeq(oct, clock_comp, CN6XXX_MIO_PTP_CLOCK_COMP);
16771677

16781678
/* Enable */

0 commit comments

Comments
 (0)