From patchwork Mon Jun 18 15:41:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10472143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A0F446029B for ; Mon, 18 Jun 2018 15:42:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90B5C28931 for ; Mon, 18 Jun 2018 15:42:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 857DB2897E; Mon, 18 Jun 2018 15:42:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D998B28931 for ; Mon, 18 Jun 2018 15:41:59 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C208C266E8B; Mon, 18 Jun 2018 17:41:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8653D2672B4; Mon, 18 Jun 2018 17:41:56 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by alsa0.perex.cz (Postfix) with ESMTP id DFF5C266E77 for ; Mon, 18 Jun 2018 17:41:54 +0200 (CEST) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0MWseJ-1fjT9m2SCp-00XrGv; Mon, 18 Jun 2018 17:41:21 +0200 From: Arnd Bergmann To: Jaroslav Kysela , Takashi Iwai , Arnd Bergmann Date: Mon, 18 Jun 2018 17:41:01 +0200 Message-Id: <20180618154108.2227779-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180618154108.2227779-1-arnd@arndb.de> References: <20180618154108.2227779-1-arnd@arndb.de> X-Provags-ID: V03:K1:1tH0sVUHDQdRbxJeB9m+C0hMkpePO78Cctp9xs4OwP4yeH1A0F2 QW843IGYDToD6c/Eb+oOPJ1IOoroaZ9gAtpPf1kLIYUeI89KmeimA7rp8THacuhCShV6HMY wSfvxGLddcouOhNdwLd5jCemCwubnT9nI5QDnCktwCVAJ2WKY4afxLsyVGqDzspxU8GJ4dE Z29DRaw0XWTyvMUQzUQog== X-UI-Out-Filterresults: notjunk:1; V01:K0:0hXb8ET96kY=:OHHqYDOtJu518W1LZPe1IP /CUzVD31RrEDqk+uXhGd2yveHW+NeejexR9NYfXIju9L/sWHzXazYhFO96pkrsjxxwpBVcdE5 8s2NjLDse8T4jHd44xo+wWFYb7l31INUjW73eSGapIBsTES/JOLtSuCtPuGuNDgErTq1AvwyG 3hB5wds9Nq2ieWke3hnzcVA3NIJX72Fb6jqeTB24epSHUl2L+glznE/icUuE32JFtwDbU2cNs 0sRHWoi6Uly6u0RlXXWserdJ+8/JbX3OZTAAij34llr4xf1KGNb9TQTOLVVAPctDdB7l3UOCo otjJMDkPASvxWkoITtCx/3HQStcrUYerNjrxFOtvfeWxCOW+988d60eyOrQdh4t4FTD2YhuFl BcbFdukKfExAdA1fUWtpel7gKTDQbnf8AGlvtbOYr0y2DWut+KhU/V/Ev9LUKcm2wunll234z q/5EL678B7siyLztkqhpwI0jcde7VqOEfwNbslq6th5RxEYeuXA9hTDmTdGAYa53Uzm2cle3U 39yO1BHlZBgwClHDIzzP/nzISwPjilDjYzNmJnt2kAcJx/Ft2pnN5TgVwu4BlyQQP2fG6tAUK istdESRU7YRbt69xtDLENxZ00mgomaf+E9zmauel9iloQMX1lgS6+FuRIMpft/LfI/o+vs7/R atFPRxBgFNN2PWKJ+Hpjdinsnl6eaGd/yY1sGpefKZuta89ifW/5284wZK1SlUfrGJdw= Cc: y2038@lists.linaro.org, alsa-devel@alsa-project.org, Kees Cook , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 2/2] ALSA: line6: stop using get_seconds() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The get_seconds() function is deprecated because it truncates the timestamp to 32 bits, so all users should change to ktime_get_seconds() or ktime_get_real_seconds(). The firmware interface for passing the timestamp is also limited to 32 bits, so this patch only has the cosmetic effect of avoiding the old interface. Signed-off-by: Arnd Bergmann --- sound/usb/line6/toneport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c index 750467fb95db..f47ba94e6f4a 100644 --- a/sound/usb/line6/toneport.c +++ b/sound/usb/line6/toneport.c @@ -367,12 +367,13 @@ static bool toneport_has_source_select(struct usb_line6_toneport *toneport) */ static void toneport_setup(struct usb_line6_toneport *toneport) { - int ticks; + u32 ticks; struct usb_line6 *line6 = &toneport->line6; struct usb_device *usbdev = line6->usbdev; /* sync time on device with host: */ - ticks = (int)get_seconds(); + /* note: 32-bit timestamps overflow in year 2106 */ + ticks = (u32)ktime_get_real_seconds(); line6_write_data(line6, 0x80c6, &ticks, 4); /* enable device: */