From patchwork Fri Jan 22 14:28:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101140 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp713780lbb; Fri, 22 Jan 2016 06:30:45 -0800 (PST) X-Received: by 10.66.124.232 with SMTP id ml8mr4787358pab.98.1453473045733; Fri, 22 Jan 2016 06:30:45 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ww1si9851189pab.181.2016.01.22.06.30.45; Fri, 22 Jan 2016 06:30:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754407AbcAVOao (ORCPT + 30 others); Fri, 22 Jan 2016 09:30:44 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:53964 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754221AbcAVO2u (ORCPT ); Fri, 22 Jan 2016 09:28:50 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0LiWYm-1Zqqit2wRg-00ceFc; Fri, 22 Jan 2016 15:28:35 +0100 From: Arnd Bergmann To: linux-scsi@vger.kernel.org Cc: qla2xxx-upstream@qlogic.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-kernel@vger.kernel.org, y2038@lists.linaro.org, Johannes Thumshirn , Tina Ruchandani Subject: [PATCH, RESEND 2] qla2xxx: Remove use of 'struct timeval' Date: Fri, 22 Jan 2016 15:28:32 +0100 Message-ID: <1528415.ru8bxkDU1V@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:RdGKiXfo357NA+ylRBgPqw8k7vZobYvzeyPAPfYnMzcwSC/Z/W2 F0CYYXgJlTJTWWUYD8bLFubTt9qKU7PMFuwyHJZk/o85RCIbwlc6CHzV8ecvW8ZH3lCvNeS jgRyKnyDXq/HoENt3/c4TRZqlPkCpUPxori4Qf8LQO+vtMUD/QwbFT/ox/MM6VLxNoQGOfp vMqGMRFkaPEMYxQ5z2wow== X-UI-Out-Filterresults: notjunk:1; V01:K0:I1B22GX1rLo=:C514XDon1/CNSZQvXFaaUe UGLXGKxBjTD27daGBCWbOR33QTtgs2gxQ6j7DMR4S4hqrntCrjwIf7nH8TYcrsc31imCDS8AA RXt1CaOaBRvawgKi4bt8b0sY/4g5W3NzMIe6HNrQQZ/JCn50x1Wo6YQtYEuSjljPYezJzaM4k edblAuiCQ60zT/kifSvwn5MP4uUZ0MQqs+ufFpJ7lo+89K286b66qU8a0G6iFsmXT5YdLwGYJ GJ8s+W8rBWLCFOwoh+yzYjJE5kkJCy2XKIAW+WumdfL5O5h66OHAFkIHFEE5nvttXXdtOBO9c dYJAtszZAPkESIDyyhviAdy8VsWlwTuPTHcT/2ZdenG5dI6HcMxrX+lSDpVdgjaMNwAFB225w 9F3hllZJUdVncvwf84riSlwzyzpZgI+liBkIIy2v5sh8Xv5VpTEqni+Lf55oUKxsGWpU18/vZ PGbOsmpQmmBXyKAbR+ausGORtP501lZEwx/rEguL1zSMVFVKsHMYigfgMsn9xlGxgnxO/CDXA cm+Jg2csS5ioonQnkeLy7LYvDEjAeCgohYdPXiENAVLFdY47WAtiDC6PED69xvunaoxhwINJx E3OHHKpfo4uc9SoRy9WvQJFcLemA63CeBdMPXraNEV+y/RPBza+UTs9OGvEvxqB3HIA194kO7 Ds6KXWszJe8NlsWVwF/lAQudG0jvG9L7ASLFekDqwFVmdz2aAjMy2lh6BnI4KHTGmEn8a2bFL 3VzaaoWAl/z3Rdh/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org struct register_host_info stores a 64-bit UTC system time timestamp. This patch removes the use of 'struct timeval' to obtain that timestamp as its tv_sec value will overflow on 32-bit systems in year 2038 beyond. The patch uses ktime_get_real_seconds() which returns a 64-bit seconds value. Signed-off-by: Tina Ruchandani Reviewed-by: Johannes Thumshirn Signed-off-by: Arnd Bergmann diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index b5029e543b91..15dff7099955 100644 --- a/drivers/scsi/qla2xxx/qla_mr.c +++ b/drivers/scsi/qla2xxx/qla_mr.c @@ -6,6 +6,7 @@ */ #include "qla_def.h" #include +#include #include #include #include @@ -1812,7 +1813,6 @@ qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type) struct host_system_info *phost_info; struct register_host_info *preg_hsi; struct new_utsname *p_sysid = NULL; - struct timeval tv; sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL); if (!sp) @@ -1886,8 +1886,7 @@ qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type) p_sysid->domainname, DOMNAME_LENGTH); strncpy(phost_info->hostdriver, QLA2XXX_VERSION, VERSION_LENGTH); - do_gettimeofday(&tv); - preg_hsi->utc = (uint64_t)tv.tv_sec; + preg_hsi->utc = (uint64_t)ktime_get_real_seconds(); ql_dbg(ql_dbg_init, vha, 0x0149, "ISP%04X: Host registration with firmware\n", ha->pdev->device);