From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162227AbbKEQSt (ORCPT ); Thu, 5 Nov 2015 11:18:49 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:64688 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033025AbbKEQSq (ORCPT ); Thu, 5 Nov 2015 11:18:46 -0500 From: Arnd Bergmann To: Tina Ruchandani Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, y2038 , Greg Kroah-Hartman Subject: Re: [RESEND PATCH] USB: usbmon: Use 64bit timestamp for mon_bin_hdr Date: Thu, 05 Nov 2015 17:18:41 +0100 Message-ID: <11025195.jAqGPh9YPj@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151030054431.GA360@google.com> References: <20151030054431.GA360@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:LHNetwT9ZyF1SWxrbK/wFG/JpsPdh03kDJq61KMUOM4aSC6fPqt zubHyLqvKguOJ/xLPFGs6vcsSJchI9l1jhxaYj56Ig/fNU5M9NsO9dayste2ombXB3Q0Tea TJOSDOvFnO/MUh6CaO95oDoizUesKVX3oPdUA8Eb0AohWViBenyfshMgwca/n3bzMF/3DRe zX+VwwGBnL8zsw8SCaRCA== X-UI-Out-Filterresults: notjunk:1;V01:K0:KhGKgh5xqI8=:R3AQic2+v6V6fVJPaMl3kI yvvuOjLQq4HoPVU13GLubfp5iloNxBDZVCD2M07fm/OC5WX+7FG3acLXMsfBkSR9PrRdzyQFk TDBiuBbmJeMu2+A0Yk6IP0Lt2h5K0QFLBfFGWwOBquzVoE3Wa0eMnPmacUD/h8sif9UQYnyZQ CVjvZgLypIzf9Rdg+y727ky/n3/RxLa384kRUr4uWhdQ/JKoGs31qiYjP1brJ9VheTmW9jOTS Rg36dn7seTu9DSvqY6NpzrKMaP6ixmZlr/jxXhclBrDjtmAkeK33EPPfnVEZSjlJuDVIn7Qfe STxo75oVsWrgxFcU0AHGuozUQN504RtoGL6oPPTBbrpfy+XunHdXyjb1duRTZZ9udtSSygxYp WmE2W/Wg1YaIIDQMcBwd9UmQ12Kclc+bktBXQAiL/WeowJj+7FfhmGqWRRScKantcdhJDSURe 99j+LjpoCwRqGPLp8AII01/b+2NnJ+1hGxUHeW8Rntq1mJvZdF31WeUyUCHgR+oajxy9K/8le a482L543svjSpk0jLC8YU7eiG8xHYYtqDx9zNREBvuajgKhl1U0yIE4ZG/BHdcdlWckiuT90y 5wltkHVeX3VWzPziiEKrcc7ygWQ4nEzFmxokUn6Ko+tBdjwWGoUQU3Me5TTqhFFr3X1v67d/E jpX4bBeDpAdQJ2kPEYvWpSbi7cvDNng/YnkLsrIJRJ1CF4bfrarin5t6KHFUbcP5LQ8Pid1eS NAjPi4LKS4S2eKv9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 29 October 2015 22:44:31 Tina Ruchandani wrote: > struct mon_bin_hdr allows for a 64-bit seconds timestamp. The code > currently uses 'struct timeval' to populate the timestamp in mon_bin_hdr, > which has a 32-bit seconds field and will overflow in year 2038 and beyond. > This patch replaces 'struct timeval' with 'struct timespec64' which is > y2038 safe. This patch is part of a larger attempt to remove instances > of struct timeval and other 32-bit timekeeping (time_t, struct timespec) > from the kernel. > > Signed-off-by: Tina Ruchandani Reviewed-by: Arnd Bergmann As the patch is a week old and Greg hasn't picked it up yet, I'm guessing that he doesn't have it in his queue any more and you should send it once more with my 'Reviewed-by' tag. > @@ -494,7 +495,7 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb, > struct mon_bin_hdr *ep; > char data_tag = 0; > > - do_gettimeofday(&ts); > + getnstimeofday64(&ts); > > spin_lock_irqsave(&rp->b_lock, flags); > This is a very minor comment I still have, and the patch is fine as it, but I tend to prefer ktime_get_real_ts64() over getnstimeofday64() these days. The two functions do the exact same thing, and I hope to remove the latter eventually. Arnd