* [PATCH] [net] liquidio: fix timespec64_to_ns typo
@ 2017-10-12 9:48 Arnd Bergmann
2017-10-12 18:07 ` Felix Manlunas
2017-10-13 17:19 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-10-12 9:48 UTC (permalink / raw)
To: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi
Cc: Arnd Bergmann, David S. Miller, Intiyaz Basha, Rick Farrington,
VSR Burru, netdev, linux-kernel
While experimenting with changes to the timekeeping code, I
ran into a build error in the liquidio driver:
drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'liquidio_ptp_settime':
drivers/net/ethernet/cavium/liquidio/lio_main.c:1850:22: error: passing argument 1 of 'timespec_to_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
The driver had a type mismatch since it was first merged, but
this never caused problems because it is only built on 64-bit
architectures that define timespec and timespec64 to the same
type.
If we ever want to compile-test the driver on 32-bit or change
the way that 64-bit timespec64 is defined, we need to fix it,
so let's just do it now.
Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 963803bc6633..eafae3eb4fed 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -1847,7 +1847,7 @@ static int liquidio_ptp_settime(struct ptp_clock_info *ptp,
struct lio *lio = container_of(ptp, struct lio, ptp_info);
struct octeon_device *oct = (struct octeon_device *)lio->oct_dev;
- ns = timespec_to_ns(ts);
+ ns = timespec64_to_ns(ts);
spin_lock_irqsave(&lio->ptp_lock, flags);
lio_pci_writeq(oct, ns, CN6XXX_MIO_PTP_CLOCK_HI);
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [net] liquidio: fix timespec64_to_ns typo
2017-10-12 9:48 [PATCH] [net] liquidio: fix timespec64_to_ns typo Arnd Bergmann
@ 2017-10-12 18:07 ` Felix Manlunas
2017-10-13 17:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Felix Manlunas @ 2017-10-12 18:07 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi,
David S. Miller, Intiyaz Basha, Rick Farrington, VSR Burru,
netdev, linux-kernel
On Thu, Oct 12, 2017 at 11:48:31AM +0200, Arnd Bergmann wrote:
> While experimenting with changes to the timekeeping code, I
> ran into a build error in the liquidio driver:
>
> drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'liquidio_ptp_settime':
> drivers/net/ethernet/cavium/liquidio/lio_main.c:1850:22: error: passing argument 1 of 'timespec_to_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
>
> The driver had a type mismatch since it was first merged, but
> this never caused problems because it is only built on 64-bit
> architectures that define timespec and timespec64 to the same
> type.
>
> If we ever want to compile-test the driver on 32-bit or change
> the way that 64-bit timespec64 is defined, we need to fix it,
> so let's just do it now.
>
> Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
> index 963803bc6633..eafae3eb4fed 100644
> --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
> +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
> @@ -1847,7 +1847,7 @@ static int liquidio_ptp_settime(struct ptp_clock_info *ptp,
> struct lio *lio = container_of(ptp, struct lio, ptp_info);
> struct octeon_device *oct = (struct octeon_device *)lio->oct_dev;
>
> - ns = timespec_to_ns(ts);
> + ns = timespec64_to_ns(ts);
>
> spin_lock_irqsave(&lio->ptp_lock, flags);
> lio_pci_writeq(oct, ns, CN6XXX_MIO_PTP_CLOCK_HI);
> --
> 2.9.0
>
Thanks.
Acked-by: Felix Manlunas <felix.manlunas@cavium.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [net] liquidio: fix timespec64_to_ns typo
2017-10-12 9:48 [PATCH] [net] liquidio: fix timespec64_to_ns typo Arnd Bergmann
2017-10-12 18:07 ` Felix Manlunas
@ 2017-10-13 17:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-10-13 17:19 UTC (permalink / raw)
To: arnd
Cc: derek.chickles, satananda.burla, felix.manlunas, raghu.vatsavayi,
intiyaz.basha, ricardo.farrington, veerasenareddy.burru, netdev,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 12 Oct 2017 11:48:31 +0200
> While experimenting with changes to the timekeeping code, I
> ran into a build error in the liquidio driver:
>
> drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'liquidio_ptp_settime':
> drivers/net/ethernet/cavium/liquidio/lio_main.c:1850:22: error: passing argument 1 of 'timespec_to_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
>
> The driver had a type mismatch since it was first merged, but
> this never caused problems because it is only built on 64-bit
> architectures that define timespec and timespec64 to the same
> type.
>
> If we ever want to compile-test the driver on 32-bit or change
> the way that 64-bit timespec64 is defined, we need to fix it,
> so let's just do it now.
>
> Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-13 17:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 9:48 [PATCH] [net] liquidio: fix timespec64_to_ns typo Arnd Bergmann
2017-10-12 18:07 ` Felix Manlunas
2017-10-13 17:19 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).