Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Mar 2017 15:33:38 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314859 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201703071533.v27FXcqE020097@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Mar  7 15:33:38 2017
New Revision: 314859
URL: https://svnweb.freebsd.org/changeset/base/314859

Log:
  Make sure jiffies value is cast to an integer in the LinuxKPI before
  doing millisecond conversion. Under FreeBSD jiffies are 32-bit.
  
  MFC after:		1 week
  Sponsored by:		Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/jiffies.h

Modified: head/sys/compat/linuxkpi/common/include/linux/jiffies.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/jiffies.h	Tue Mar  7 15:27:40 2017	(r314858)
+++ head/sys/compat/linuxkpi/common/include/linux/jiffies.h	Tue Mar  7 15:33:38 2017	(r314859)
@@ -40,7 +40,7 @@
 
 #define jiffies                 ticks
 #define	jiffies_64		ticks
-#define jiffies_to_msecs(x)     (((int64_t)(x)) * 1000 / hz)
+#define	jiffies_to_msecs(x)     (((int64_t)(int)(x)) * 1000 / hz)
 
 #define	MAX_JIFFY_OFFSET	((INT_MAX >> 1) - 1)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703071533.v27FXcqE020097>