From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751308AbcBKOzk (ORCPT ); Thu, 11 Feb 2016 09:55:40 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:53414 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750765AbcBKOzi (ORCPT ); Thu, 11 Feb 2016 09:55:38 -0500 Date: Thu, 11 Feb 2016 09:55:34 -0500 (EST) Message-Id: <20160211.095534.840091300723732679.davem@davemloft.net> To: amitoj1606@gmail.com Cc: t.sailer@alumni.ethz.ch, linux-hams@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, y2038@lists.linaro.org Subject: Re: [PATCH] net: hamradio: baycom_ser_fdx: Replace timeval with timespec64 From: David Miller In-Reply-To: <20160210043854.GA29381@amitoj-Inspiron-3542> References: <20160210043854.GA29381@amitoj-Inspiron-3542> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 11 Feb 2016 06:55:38 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amitoj Kaur Chawla Date: Wed, 10 Feb 2016 10:08:54 +0530 > 32 bit systems using 'struct timeval' will break in the year 2038, so > we replace the code appropriately. However, this driver is not broken > in 2038 since we are only using microseconds portion of the time. > > This patch replaces 'struct timeval' with 'struct timespec64'. We only > need to find elapsed microseconds rather than absolute time, so it's > better to use monotonic time, so using ktime_get_ts64() makes the code > more efficient and more robust against concurrent settimeofday() > calls. > > Signed-off-by: Amitoj Kaur Chawla > Reviewed-by: Arnd Bergmann Applied.