From patchwork Mon Jan 25 22:00:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101093 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1614993lbb; Mon, 25 Jan 2016 14:00:47 -0800 (PST) X-Received: by 10.66.140.79 with SMTP id re15mr28387335pab.127.1453759247242; Mon, 25 Jan 2016 14:00:47 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c90si36325362pfd.178.2016.01.25.14.00.45; Mon, 25 Jan 2016 14:00:47 -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 S1755363AbcAYWAn (ORCPT + 30 others); Mon, 25 Jan 2016 17:00:43 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:60920 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751763AbcAYWAk (ORCPT ); Mon, 25 Jan 2016 17:00:40 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0M1ygd-1a84Ty0nOt-00u2gC; Mon, 25 Jan 2016 23:00:25 +0100 From: Arnd Bergmann To: "Martin K. Petersen" , "James E.J. Bottomley" Cc: Johannes Thumshirn , Tina Ruchandani , Himanshu Madhani , y2038@lists.linaro.org, linux-scsi , linux-kernel , Dept-Eng QLA2xxx Upstream Subject: [PATCH, RESEND 3] qla2xxx: Remove use of 'struct timeval' Date: Mon, 25 Jan 2016 23:00:20 +0100 Message-ID: <3640852.TIcaPixAiA@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:DEUbWD7XpgFLZnBIxFVT8kPgRJTRBqQARvN/2czUqc76iP7JitV dmyOve9kwZYrJCjIyYsXQqyTYL1Fp+eo6Z/OvSgt1j3BAjvxx3rHKWxBDmja3urF/0lpYvX 3j/u0fmHDl5mRW2bDUlQ4ldnok841y1ZzFE9FdklbHP79tBu/zEOvIhjOtx8pZmK85Oqit2 f3hYjrXvOAuyDgtT6sWqQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:H3kmxK54dW8=:x6jmy3PJ3Yq00s08XkggV0 9/yDRsj6aORN8bpz0omdpjRMbB8OesDLAoHjpWxK3toytSFQeg2euL0SJQDXSjKBvHZW2JUUm TMoJyOEx2RpU23HZu57zUUjDaEPd2S8stV3SRLdqktTek1pyX/H6hkRNP8Z+p1oXVdKCALY+u YhUixz24ETvGHsmxAEAX0Z18XNpX8ObUMvqvHDQWdj4Dv+8F08Ohtlrob0ua1fOQf5WQfVdSn nz0FnJbNK9NB+1mkbDb5XqWzxZw89pms+997QkN7OjRQmsasaKFR4OP6TNXuJ6VTkSHlcqF3s +NKLfZXSyG7UJQ6TDvQ1qb+g/FtMKj3e4rTycX2XaOkt74wQa1nwMTMNwbXBJcoCwQQQhotP/ +kwzYmxM/iQXRXzcni7S94yzbWkXVfGOmvVxcw+gPzOeAjMm7Bfclu0HGE+cshfTRbkFZC7cF mfQym1qdEpi3/XxrDmOUUOuo/pIPq7geaKiDuY3O5GGNqqFDMnNTAGVIvTS6Czzs9VllghUkT 5jrJDJlAK1L148u2/ogWtpoYpUC5Vr3pCUIWgSGbfsyHO9ldhirRlsZFR0mTgpZ8CslK40kJc NNr/1xPwr6vHlcdLqs7h3I3vBdmhR+BwTQy4E0DRM8Y5JpJXUWZIRaYTXZ68Czvud3Ef5Q3mk 23Cqufkh71/2RIlpHHVqky7kxOv5LlTN9FhofE0tw37NREkjhwTUwuGKqh5pLUbELCbzsRV3/ sgZQU9Vwtjqp+9tc Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tina Ruchandani 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 Acked-by: Himanshu Madhani Signed-off-by: Arnd Bergmann --- Resent with correct author field and added Ack 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);