Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426657

Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation
Date 2016-06-20 16:50 +0200
Message-ID <rM8Gt-13f-9@gated-at.bofh.it> (permalink)
References <rL4bV-8nW-43@gated-at.bofh.it> <rM8Gt-13f-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] scsi: libfc: fix seconds_since_last_reset calculation Arnd Bergmann <arnd@arndb.de> - 2016-06-17 17:50 +0200
  Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation Arnd Bergmann <arnd@arndb.de> - 2016-06-20 16:50 +0200
  Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-06-21 04:10 +0200

csiph-web