|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] xen/pcifront: Remove usage of struct timeval
On 05/19/2015 02:08 AM, Tina Ruchandani wrote: struct timeval uses a 32-bit field for representing seconds, which will overflow in the year 2038 and beyond. This patch replaces struct timeval with 64-bit ktime_t which is 2038 safe. The patch is part of a larger effort to remove instances of 32-bit timekeeping variables (timeval, time_t and timespec) from the kernel. Signed-off-by: Tina Ruchandani <ruchandani.tina@xxxxxxxxx> Suggested-by: Arnd Bergmann <arnd@xxxxxxxx> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> -- Changes in v2: - Use monotonic time (ktime_get_ns()) instead of real time since we only care about elapsed delta here. - Use macro ktime_get_ns() instead of getting ktime_t and converting it to ns. --- drivers/pci/xen-pcifront.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 7cfd2db..c4796c8 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -20,6 +20,7 @@ #include <linux/workqueue.h> #include <linux/bitops.h> #include <linux/time.h> +#include <linux/ktime.h> #include <xen/platform_pci.h>#include <asm/xen/swiotlb-xen.h> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |