From: Arnd Bergmann <arnd@arndb.de>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, Vasu Dev <vasu.dev@intel.com>,
y2038@lists.linaro.org, linux-kernel@vger.kernel.org,
fcoe-devel@open-fcoe.org
Subject: Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation
Date: Mon, 20 Jun 2016 16:50:01 +0200 [thread overview]
Message-ID: <3671744.A3ustGCdmM@wuerfel> (raw)
In-Reply-To: <76a47d73-26e2-5a9f-7a03-21c72ca613ca@sandisk.com>
On Monday, June 20, 2016 3:54:06 PM CEST Bart Van Assche wrote:
> On 06/17/2016 05:47 PM, Arnd Bergmann wrote:
> > - jiffies_to_timespec(jiffies, &v0);
> > - jiffies_to_timespec(lport->boot_time, &v1);
> > - fc_stats->seconds_since_last_reset = (v0.tv_sec - v1.tv_sec);
> > + fc_stats->seconds_since_last_reset = (lport->boot_time - jiffies) / HZ;
>
> Does this patch introduce a 64-bit division? There might still be 32-bit
> users of this code.
No, both lport->boot_time and jiffies are 'unsigned long'.
Arnd
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Vasu Dev <vasu.dev@intel.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
y2038@lists.linaro.org, fcoe-devel@open-fcoe.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation
Date: Mon, 20 Jun 2016 16:50:01 +0200 [thread overview]
Message-ID: <3671744.A3ustGCdmM@wuerfel> (raw)
In-Reply-To: <76a47d73-26e2-5a9f-7a03-21c72ca613ca@sandisk.com>
On Monday, June 20, 2016 3:54:06 PM CEST Bart Van Assche wrote:
> On 06/17/2016 05:47 PM, Arnd Bergmann wrote:
> > - jiffies_to_timespec(jiffies, &v0);
> > - jiffies_to_timespec(lport->boot_time, &v1);
> > - fc_stats->seconds_since_last_reset = (v0.tv_sec - v1.tv_sec);
> > + fc_stats->seconds_since_last_reset = (lport->boot_time - jiffies) / HZ;
>
> Does this patch introduce a 64-bit division? There might still be 32-bit
> users of this code.
No, both lport->boot_time and jiffies are 'unsigned long'.
Arnd
next prev parent reply other threads:[~2016-06-20 14:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 15:47 [PATCH] scsi: libfc: fix seconds_since_last_reset calculation Arnd Bergmann
2016-06-17 15:47 ` Arnd Bergmann
2016-06-20 13:54 ` Bart Van Assche
2016-06-20 13:54 ` Bart Van Assche
2016-06-20 14:50 ` Arnd Bergmann [this message]
2016-06-20 14:50 ` Arnd Bergmann
2016-06-20 14:58 ` Bart Van Assche
2016-06-20 14:58 ` Bart Van Assche
2016-06-21 2:05 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3671744.A3ustGCdmM@wuerfel \
--to=arnd@arndb.de \
--cc=bart.vanassche@sandisk.com \
--cc=fcoe-devel@open-fcoe.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=vasu.dev@intel.com \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.