From patchwork Mon Jun 18 15:29:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 139010 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4088266lji; Mon, 18 Jun 2018 08:30:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIGnFiMHnbCYaOo7ZMig+kFsMfn1tDBMiXQcgIo9WcQURjm2QVHled8bpULQtQLBde/NRwi X-Received: by 2002:a62:4556:: with SMTP id s83-v6mr14092880pfa.73.1529335820571; Mon, 18 Jun 2018 08:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529335820; cv=none; d=google.com; s=arc-20160816; b=CkDLrw99LWJ4q96BfxLp2uLNbnlMeD77gMtTZ06LcerdXX3G/N2ngFLqrRZ5TnLAvc m9vFEXUuPDplbOHvRA84ew/59VwjxpeCJ5w8GdtTVCcZCnfVAlcGc7XfAT+00cdMCiK3 4sxrhQ+kYlffj2dENBBflgY2rk6p30FuMLwm4wA/6r4WM4Tj5KN43DJIYOyYQowOIPBO ki0uiZrJpKUnMMwaXeHa1reu2XP4tCq7YyIhZZZUCMmi2dUrnjDEchStB6oJE0+o0oBx LoI9rYRg9H4T6SlHv3anAR70kf6OEQSsRUvymZXqzSUMoe66SO5x9cgcX3N+Yzhmry0v 3SzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KIA5wfMpF6B3WT4hluR+qf66OErkawc12XGY429IGOU=; b=vvWsK3Py7Rdj3ANfrjcfp1OiobT6R5mq4wemRrIA/gRNrl3BRmmZzGN065rB4YlqnS nMOuYiZ5P1NbR2vyJApv3jWlJIcY1uQG3rEkEDiPcIb2kGVMe2fcV5zt77AE2TrFXeAg 6b60K+UZ2EmAyj+tIS9n67N4Bp1qnge0gwyD7zh9tO2/D9nn4/leKxjs0QW1vElmp/lV ByaW6zKiqNtUF/Pk7epmkv7kagwyL24IwfBWrw6jxyD4ZSg1ZtA/sqdEb+ZTtI6NWGAJ gc0ykjIyUzZS+aiUwatPc39WEvtuw4QTfHCo5D86sBsm/Xe1Tx+qzYM8ZZ2WluAB/uzd OYKw== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si15338429ple.308.2018.06.18.08.30.20; Mon, 18 Jun 2018 08:30:20 -0700 (PDT) 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 S1755231AbeFRPaS (ORCPT + 30 others); Mon, 18 Jun 2018 11:30:18 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:51167 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753570AbeFRPaQ (ORCPT ); Mon, 18 Jun 2018 11:30:16 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0LhHE4-1fzeCz3V1E-00mdTV; Mon, 18 Jun 2018 17:30:05 +0200 From: Arnd Bergmann To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: y2038@lists.linaro.org, Arnd Bergmann , Hannes Reinecke , Johannes Thumshirn , James Smart , Jens Axboe , Tyrel Datwyler , Steffen Maier , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi_transport_fc: use 64-bit timestamps consistently Date: Mon, 18 Jun 2018 17:29:51 +0200 Message-Id: <20180618153004.1808419-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:n6eE0IN1X1w26lvEKScjAU7VFzMcgOnarfsDBImwHIG5Gcqa8t6 P0lVXvFkWoqF4LT/r0AGxnkuariZC/2MWNuwf618nRCHf5l6rizgBZUhbtnn5BhofRChEe0 JHU+BRMSH9+7TqnwIvmQi7dSa0mhloEsz3BFLXA+HMGHw8fgyppgzyzOkqgr7aiwdxDl/WS zVYv7+1QYI37w8J5Zf9Wg== X-UI-Out-Filterresults: notjunk:1; V01:K0:xKlikjjSjKY=:AZ7vhoeYUumCWkex+cKiuG 0r35lcZdYjBorXfYby1gwHprOpihS4Bvqgkfmp8UPobz+NxPVgZqJJksQ5aBBTYjQBVhse89x mhRkxGpbVkMglmu5OBu2U870qICBKDiRa+gNQF7RxxpmtoGgnKAOzso06Hvn5gKkb8ZjE0z3K ymsfUoKTsWtwXQNFhIjA4SAo8yO1fA9e1k1SKrP4Ue61/MLJE2q6BbsvElqMjgcQVY6EFZ8Vq hTo5QtCUDw936LmIjHaWRyP0SfqZnBekPPytVlFmn9dVYG6vFBHOTmoISw4EyWPV3F1YxVHaN hxIGUIVthBW3Y3pdrr/Asa1R/nE39ngu8jGSKCPrq13h0WU85v+23/edJ1+Pb0N/ANAfQFldi FTr4oEP/635cgRxi+oZISBr/7iHamu6Md6tabxtvsqbiJWYi0/Tdvy+7yMe4Q7bpgmmhHPL1j SJ1chHnR3xMN98qng4N1lsWLD7FMivq/SGUfFWH+S6JRgrj/H4f2bsPD/GK1qUqC+0JM7Nuw5 xt+MpxXOLcje23Xeq4G8VDdBVYMgQvmdg+WyLEesEi6AqTZjKVmd/lzOpC4tgIqsWv4z+qscj PcYdV1KSpVAQMQNKHoIYefdh9osMTmysFxE3ZPhtSzTdtl3WMO9nMg8ebDeYLBlvGTUJJJmB/ tnHNPCcD+l2glvArmdtAZzOLETppwaRD7Qdj1J0pWcFT+Goh6iS61DXe3yH/N6em9vAk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The get_seconds() helper returns an 'unsigned long' value, which can overflow on 32-bit architectures. Since the interface we pass it into already uses a 64-bit type, we can just use ktime_get_real_seconds() instead. While we generally prefer local timestamps in CLOCK_MONOTONIC format (ktime_get_seconds), this keeps using the CLOCK_REALTIME version in order to maintain compatibility with existing code. Signed-off-by: Arnd Bergmann --- drivers/scsi/scsi_transport_fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 Reviewed-by: Johannes Thumshirn Reviewed-by: James Smart diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 1da3d71e9f61..bb6de88aa724 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -567,7 +567,7 @@ fc_host_post_event(struct Scsi_Host *shost, u32 event_number, INIT_SCSI_NL_HDR(&event->snlh, SCSI_NL_TRANSPORT_FC, FC_NL_ASYNC_EVENT, len); - event->seconds = get_seconds(); + event->seconds = ktime_get_real_seconds(); event->vendor_id = 0; event->host_no = shost->host_no; event->event_datalen = sizeof(u32); /* bytes */ @@ -635,7 +635,7 @@ fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number, INIT_SCSI_NL_HDR(&event->snlh, SCSI_NL_TRANSPORT_FC, FC_NL_ASYNC_EVENT, len); - event->seconds = get_seconds(); + event->seconds = ktime_get_real_seconds(); event->vendor_id = vendor_id; event->host_no = shost->host_no; event->event_datalen = data_len; /* bytes */