diff options
author | 2022-02-10 18:05:44 -0800 | |
---|---|---|
committer | 2022-02-11 16:54:47 -0800 | |
commit | f126ec9d6e57729b3f7fad5d0e38bacfb81c8254 (patch) | |
tree | 01fc3de62d78a7a157d278568480c4c8fcf54c67 /drivers/net | |
parent | net: moxa: use GFP_KERNEL (diff) | |
download | linux-f126ec9d6e57729b3f7fad5d0e38bacfb81c8254.tar.gz linux-f126ec9d6e57729b3f7fad5d0e38bacfb81c8254.tar.bz2 linux-f126ec9d6e57729b3f7fad5d0e38bacfb81c8254.zip |
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.
Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/all/056a7276-c6f0-cd7e-9e46-1d8507a0b6b1@wanadoo.fr/
Fixes: 038fcdaf0470 ("net: ethernet: cavium: use div64_u64() instead of do_div()")
Link: https://lore.kernel.org/r/20220211020544.3262694-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c index 8e07192e409f..ba28aa444e5a 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c @@ -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 */ |