From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964787AbcFQU5y (ORCPT ); Fri, 17 Jun 2016 16:57:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:49902 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754857AbcFQU5w (ORCPT ); Fri, 17 Jun 2016 16:57:52 -0400 Date: Fri, 17 Jun 2016 22:57:51 +0200 Message-ID: From: Takashi Iwai To: "Arnd Bergmann" Cc: "Jaroslav Kysela" , , , Subject: Re: [PATCH] ALSA: seq_timer: use monotonic times internally In-Reply-To: <20160617151054.3993410-1-arnd@arndb.de> References: <20160617151054.3993410-1-arnd@arndb.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Jun 2016 17:10:32 +0200, Arnd Bergmann wrote: > > The sequencer client manager reports timestamps in units of unsigned > 32-bit seconds/nanoseconds, but that does not suffer from the y2038 > overflow because it stores only the delta since the 'last_update' > time was recorded. > > However, the use of the do_gettimeofday() function is problematic > and we have to replace it to avoid the overflow on on 32-bit > architectures. > > This uses 'struct timespec64' to record 'last_update', and changes > the code to use monotonic timestamps that do not suffer from leap > seconds and settimeofday updates. > > As a side-effect, the code can now use the timespec64_sub() helper > and become more readable and also avoid a multiplication to convert > from microseconds to nanoseconds. > > Signed-off-by: Arnd Bergmann Thanks, applied. It's even a nice cleanup! Takashi