* [PATCH] net: tilegx: use correct timespec64 type
@ 2016-06-17 16:15 Arnd Bergmann
2016-06-17 16:18 ` Chris Metcalf
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-06-17 16:15 UTC (permalink / raw)
To: Chris Metcalf; +Cc: y2038, netdev, Richard Cochran, linux-kernel, Arnd Bergmann
The conversion to the 64-bit time based ptp methods left two instances
of 'struct timespec' in place. This is harmless because 64-bit
architectures define timespec64 as timespec, and this driver is
not used on 32-bit machines.
However, using 'struct timespec64' directly is obviously the right
thing to do, and will help us remove 'struct timespec' in the future.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: b9acf24f779c ("ptp: tilegx: convert to the 64 bit get/set time methods.")
---
drivers/net/ethernet/tile/tilegx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
index 0a15acc075b3..11213a38c795 100644
--- a/drivers/net/ethernet/tile/tilegx.c
+++ b/drivers/net/ethernet/tile/tilegx.c
@@ -462,7 +462,7 @@ static void tile_tx_timestamp(struct sk_buff *skb, int instance)
if (unlikely((shtx->tx_flags & SKBTX_HW_TSTAMP) != 0)) {
struct mpipe_data *md = &mpipe_data[instance];
struct skb_shared_hwtstamps shhwtstamps;
- struct timespec ts;
+ struct timespec64 ts;
shtx->tx_flags |= SKBTX_IN_PROGRESS;
gxio_mpipe_get_timestamp(&md->context, &ts);
@@ -886,9 +886,9 @@ static struct ptp_clock_info ptp_mpipe_caps = {
/* Sync mPIPE's timestamp up with Linux system time and register PTP clock. */
static void register_ptp_clock(struct net_device *dev, struct mpipe_data *md)
{
- struct timespec ts;
+ struct timespec64 ts;
- getnstimeofday(&ts);
+ ktime_get_ts64(&ts);
gxio_mpipe_set_timestamp(&md->context, &ts);
mutex_init(&md->ptp_lock);
--
2.9.0
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: tilegx: use correct timespec64 type
2016-06-17 16:15 [PATCH] net: tilegx: use correct timespec64 type Arnd Bergmann
@ 2016-06-17 16:18 ` Chris Metcalf
2016-06-17 19:10 ` Richard Cochran
2016-06-18 5:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Chris Metcalf @ 2016-06-17 16:18 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: y2038, netdev, Richard Cochran, linux-kernel
On 6/17/2016 12:15 PM, Arnd Bergmann wrote:
> The conversion to the 64-bit time based ptp methods left two instances
> of 'struct timespec' in place. This is harmless because 64-bit
> architectures define timespec64 as timespec, and this driver is
> not used on 32-bit machines.
>
> However, using 'struct timespec64' directly is obviously the right
> thing to do, and will help us remove 'struct timespec' in the future.
>
> Signed-off-by: Arnd Bergmann<arnd@arndb.de>
> Fixes: b9acf24f779c ("ptp: tilegx: convert to the 64 bit get/set time methods.")
> ---
> drivers/net/ethernet/tile/tilegx.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Acked-by: Chris Metcalf <cmetcalf@mellanox.com>
--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: tilegx: use correct timespec64 type
2016-06-17 16:15 [PATCH] net: tilegx: use correct timespec64 type Arnd Bergmann
2016-06-17 16:18 ` Chris Metcalf
@ 2016-06-17 19:10 ` Richard Cochran
2016-06-18 5:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Richard Cochran @ 2016-06-17 19:10 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: y2038, netdev, Chris Metcalf, linux-kernel
On Fri, Jun 17, 2016 at 06:15:30PM +0200, Arnd Bergmann wrote:
> The conversion to the 64-bit time based ptp methods left two instances
> of 'struct timespec' in place. This is harmless because 64-bit
> architectures define timespec64 as timespec, and this driver is
> not used on 32-bit machines.
>
> However, using 'struct timespec64' directly is obviously the right
> thing to do, and will help us remove 'struct timespec' in the future.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: b9acf24f779c ("ptp: tilegx: convert to the 64 bit get/set time methods.")
Acked-by: Richard Cochran <richardcochran@gmail.com>
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: tilegx: use correct timespec64 type
2016-06-17 16:15 [PATCH] net: tilegx: use correct timespec64 type Arnd Bergmann
2016-06-17 16:18 ` Chris Metcalf
2016-06-17 19:10 ` Richard Cochran
@ 2016-06-18 5:27 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-06-18 5:27 UTC (permalink / raw)
To: arnd; +Cc: cmetcalf, y2038, richardcochran, netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 17 Jun 2016 18:15:30 +0200
> The conversion to the 64-bit time based ptp methods left two instances
> of 'struct timespec' in place. This is harmless because 64-bit
> architectures define timespec64 as timespec, and this driver is
> not used on 32-bit machines.
>
> However, using 'struct timespec64' directly is obviously the right
> thing to do, and will help us remove 'struct timespec' in the future.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: b9acf24f779c ("ptp: tilegx: convert to the 64 bit get/set time methods.")
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-18 5:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-17 16:15 [PATCH] net: tilegx: use correct timespec64 type Arnd Bergmann
2016-06-17 16:18 ` Chris Metcalf
2016-06-17 19:10 ` Richard Cochran
2016-06-18 5:27 ` 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).