Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4284386imm; Mon, 25 Jun 2018 12:59:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKPVLAV726+p9uYqJ9k6keYRxOla3EApTiz7h+9fmyc7A/gxhxM2V44aihe2EikF4ts/2QN X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr14115096plt.288.1529956764521; Mon, 25 Jun 2018 12:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529956764; cv=none; d=google.com; s=arc-20160816; b=FOve+aP5c/RId+ASo3+iRRvboktdxOB7NsYy48VVNpUhgcJ8SOTfVteikrMFS+i1sQ Vl4cyzJkYhUVWLhhWzr/6qfUAgDNYnPc6pjR3MGcMrl80fNYKPIph09CZgTOwb9qygKg VgER2WsDHPnhvZjmfm4UAeTIrXNdSK9HXdk5sn8yVLpgODg6dJSJwed/leh9ueZl/P60 FSbeAXSrgi0PbvumyMyXGTsoKSrYHAhk8DQM4UmHMnD6h+74lRaLgOmaS6vRFbX3v1SD BmCDRevNtuZW66+GQiOBvmdjZvVCWLfMMdLlh+vezJV5kwjCr6ibk+OFhgrSAHNlSnbs JS2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=aAwad66trf1BTS6JKDeJUcDCrtiGBzSw8oF+8Pqhnnk=; b=jjpjvwTSGQc0cmc8w9HyAqQTpui6blH4pbnLPF2pz7DPes++r47l0+nkJuMYE7fzWC FpHpEV2LBfIEfEo2Ir+cVAa5HiYm/1ieGbTd+CCbNCWJ+F/cVaCsvMw5vry5Rh//sB91 y6GAyUAVop3o8+QYBrJN/aN8DKr/8mfaoNXQEzY1obGm6MraSSZgMr2r9qaD45+2dcEp RdxeYR6qBByTk3xS1maEPRCGd4wlzmMbjM+bMaow9WG+6CK6LE8iYZMNW7XTw/8XzWFy anqtN7OvPVEPAfWDqajgreaCo/M/4S3FTdchJm2j/UbMjX87y6WdGxpidiIK4ipkkByp FgLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kC1zIa4u; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e72-v6si15223379pfd.352.2018.06.25.12.59.10; Mon, 25 Jun 2018 12:59:24 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kC1zIa4u; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965168AbeFYT5J (ORCPT + 99 others); Mon, 25 Jun 2018 15:57:09 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:43483 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964980AbeFYT5H (ORCPT ); Mon, 25 Jun 2018 15:57:07 -0400 Received: by mail-pf0-f193.google.com with SMTP id y8-v6so6931636pfm.10; Mon, 25 Jun 2018 12:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aAwad66trf1BTS6JKDeJUcDCrtiGBzSw8oF+8Pqhnnk=; b=kC1zIa4uDYqptnyyK6Lo5lci+gNcz3WvQbEmtVHf4/zbHw53hzxVMrkHKykOIwSsNu 1i7geZnWsEeT2dI4JNE/gGwu5RfvxiuVFuil0jDmwIaMuQG0y0URZ8UxSCtq/Xv8MkON eIhPaxXm6N1Je6EqzcqHltv4BQrJ4mHHEedON66YMn7IXCXO3e+9OQU7qZJ/nxu08Fgw idQTMm8su9ZFAH0vuQZRYCzHAH+9QL1u5nw76UQTO9b9Y2U7tGOVdrhfe9eqyQF4koHH Q1p4xG9XO1ehugCY8/Ucg5/8sKsLprOHeaTg1iM/PFIIp81GC7V2ZgFvEYoABbC3zAMC stcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aAwad66trf1BTS6JKDeJUcDCrtiGBzSw8oF+8Pqhnnk=; b=gVE8cU7B7Mrkhoda3BObot/77CemFnQ1x94/kp4NDpq3F7+ark5ARJbmnS0n9lWrMa bh4S/ylJlqoNQiPUTEth81jEYQwa7Ujb6spsCPrHsuTIENwNtsO61+XbFa9QcnRby/DK o6122isFB30jFRZNPSoDRoWYRK5RUJ45VF6ruyc0ArLMV1+qNLtSAM3vzT7qc0u0c8rO IkN4gBqOhObHzaJnr7oBKLRUMi3+9XAt3B2yLJgRMh9SB0TNKbYD4/xYrfimbz7TPZ16 +wb1Fs9qoFYonXFW8q7uvpAla4D0UlGvD1nt0LsiI4gQuijj/J38K2pLYNahFaGYPjO5 Nh/g== X-Gm-Message-State: APt69E0N0pAd5KEZGPjdrlzSZc+DZ/ZAxBK6TtFhmCRzwcvRjf7cwAa3 3BKsQdz9bLl9HmjojEEt0TQ8I41u X-Received: by 2002:a62:5582:: with SMTP id j124-v6mr2087495pfb.20.1529956626820; Mon, 25 Jun 2018 12:57:06 -0700 (PDT) Received: from [10.69.62.13] ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id n68-v6sm27161628pfk.145.2018.06.25.12.57.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 12:57:05 -0700 (PDT) Subject: Re: [PATCH] scsi_transport_fc: use 64-bit timestamps consistently To: Arnd Bergmann , "James E.J. Bottomley" , "Martin K. Petersen" Cc: y2038@lists.linaro.org, Hannes Reinecke , Johannes Thumshirn , Jens Axboe , Tyrel Datwyler , Steffen Maier , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180618153004.1808419-1-arnd@arndb.de> From: James Smart Message-ID: Date: Mon, 25 Jun 2018 12:56:59 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180618153004.1808419-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/18/2018 8:29 AM, Arnd Bergmann wrote: > 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 */ > looks good Reviewed-by: James Smart