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);
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 Bergmannarnd@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
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
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.