From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933558AbdKBO1h (ORCPT ); Thu, 2 Nov 2017 10:27:37 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:49587 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933534AbdKBO1e (ORCPT ); Thu, 2 Nov 2017 10:27:34 -0400 X-Google-Smtp-Source: ABhQp+SweergSlUJzHMQ73cx9YrH+qj+Lxhf2R/YcMQpeuBzzn56HMTbMnrT5d0zwiSB6jG1Jz3VcQ== Subject: Re: [PATCH] skd: use ktime_get_real_seconds() To: Arnd Bergmann , Bart Van Assche Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171102114209.1686507-1-arnd@arndb.de> From: Jens Axboe Message-ID: <2008f991-f586-3552-5284-269ebc235e89@kernel.dk> Date: Thu, 2 Nov 2017 08:27:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171102114209.1686507-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02/2017 05:42 AM, Arnd Bergmann wrote: > Like many storage drivers, skd uses an unsigned 32-bit number for > interchanging the current time with the firmware. This will overflow in > y2106 and is otherwise safe. > > However, the get_seconds() function is generally considered deprecated > since the behavior is different between 32-bit and 64-bit architectures, > and using it may indicate a bigger problem. > > To annotate that we've thought about this, let's add a comment here > and migrate to the ktime_get_real_seconds() function that consistently > returns a 64-bit number. Thanks Arnd, applied. -- Jens Axboe