Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4060509imm; Mon, 18 Jun 2018 08:31:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLar8ZqZO2/57PtZ5Zs/CGV2H9GO1NYnuYOwTUXiE73W78ZCvZI0vRmQ4sD3CCmWKQW/T8d X-Received: by 2002:a17:902:5a4c:: with SMTP id f12-v6mr14816719plm.85.1529335868854; Mon, 18 Jun 2018 08:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529335868; cv=none; d=google.com; s=arc-20160816; b=buIa4ngblrSTlo5HJ0cBjnpDzlpGNBLDgWUa9mNb+sltXJAAs5gSOOEWg42/OSiAr3 0quhlPVX8YSbu5npBJEGx5ZjtBhJD1oN3WBVJi75kBCJEUyVphZ2vwP21DZYSlfpQ8b/ eqXqe83vUc3QIlR+1MbT+HhNIsTWgzd1h9UY1/XU5gUHMZIRy2fZCI/BCT9Wd5MW7w+6 OIoE7iU82n/0rIi/Rf4SJZBNixb78PRpFmHXQhMQFJJh3apyfi33wkaM9TMaIP06GzaE 2TydydJlPlWJz201j9cB2OaGKdPlQDGr20EQKMMX83s2EAkJhtInZv9M1jVNZOkZ8nP+ ULuA== 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 t9-v6si12071695pgc.511.2018.06.18.08.30.54; Mon, 18 Jun 2018 08:31:08 -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 S1755197AbeFRPaS (ORCPT + 99 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(-) 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 */ -- 2.9.0