From patchwork Fri Oct 30 09:15:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tina Ruchandani X-Patchwork-Id: 7525701 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6065EBEEA4 for ; Fri, 30 Oct 2015 09:16:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8981420552 for ; Fri, 30 Oct 2015 09:16:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD33A2053D for ; Fri, 30 Oct 2015 09:16:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759375AbbJ3JPl (ORCPT ); Fri, 30 Oct 2015 05:15:41 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:32898 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759355AbbJ3JPh (ORCPT ); Fri, 30 Oct 2015 05:15:37 -0400 Received: by padhy1 with SMTP id hy1so63106144pad.0 for ; Fri, 30 Oct 2015 02:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=PfS+2VbZK9hOaSUWzg3hOhiIoZYrtF2ONitSkK6Qbg4=; b=EnX9DlDERa7XeNj6zHOXHe4sBZRVGSpxue3EzY8qWoYIkWWU80dYKyL6ceWTT3r/XT JACZ9oUfVarc0jMnAqfiju4UiUApQBHuQwKmMhVkXD9fJQoKXOGQx8HKtp2O297CfcTt HOLsFX8T3eG2bMITHHGEFHPIaxfPLGSQAnR6TquXY+Onor9U9WXGc/25ht+GPHR+jjxC eqRwFHKjyPp7WKQegruqr6+Df4lPlGfWh5jLh/oT8PQZAy+iz7ayYD7d7T7rSSuoib/v WzlFi5LVfObdIWG3DmHlanTtRaQ9D0s/ZmdbQl9fqzZtJRCR45QVXUXy+XheGwSnu8+u /A+w== X-Received: by 10.68.203.73 with SMTP id ko9mr7589865pbc.139.1446196537408; Fri, 30 Oct 2015 02:15:37 -0700 (PDT) Received: from tina-laptop ([2602:301:779f:31e0:dcc6:66f6:ae0d:2aff]) by smtp.gmail.com with ESMTPSA id rz9sm6912536pbb.61.2015.10.30.02.15.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Oct 2015 02:15:37 -0700 (PDT) Date: Fri, 30 Oct 2015 02:15:26 -0700 From: Tina Ruchandani To: linux-scsi@vger.kernel.org Cc: Arnd Bergmann , "James E.J. Bottomley" , y2038@lists.linaro.org Subject: [RESEND PATCH] qla2xxx: Remove use of 'struct timeval' Message-ID: <20151030091526.GA4028@tina-laptop> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Arnd Bergmann --- drivers/scsi/qla2xxx/qla_mr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index 6d190b4..d64a64a 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);