Re: [PATCH net-next V2 19/23] ptp: tilegx: convert to the 64 bit get/set time methods.
From: Richard Cochran <richardcochran@gmail.com>
Date: 2015-03-23 16:58:49
Also in:
lkml
From: Richard Cochran <richardcochran@gmail.com>
Date: 2015-03-23 16:58:49
Also in:
lkml
On Mon, Mar 23, 2015 at 12:02:03PM -0400, Chris Metcalf wrote:
This driver is 64-bit only. Would it make more sense to just change the accessors from gettime/settime to gettime/settime64 and nothing else, i.e. rely on the current behavior that timespec and timespec64 are the same type, and trust the compiler to fail it if somehow someone tried to build this driver into a 32-bit kernel?
On the one hand, I think the best way would be for gxio_mpipe_get/set_timestamp to also take a timespec64, because it makes the width clear. With a plain old timespec, you have to remember whether you are 64 bit or not. However, but I couldn't tell if changing gxio_mpipe_get/set_timestamp would work for other callers or not. If the driver is 64 bit only, shouldn't that be reflected in the Kconfig? On the other hand, I wouldn't mind the change you suggest, if it were super obvious that the code is 64 bit only. It was not obvious to me. Thanks, Richard