From owner-svn-src-head@freebsd.org Tue Mar 7 15:33:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F189DD01824; Tue, 7 Mar 2017 15:33:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE34C14CD; Tue, 7 Mar 2017 15:33:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v27FXcJT020098; Tue, 7 Mar 2017 15:33:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v27FXcqE020097; Tue, 7 Mar 2017 15:33:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703071533.v27FXcqE020097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 7 Mar 2017 15:33:38 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 15:33:40 -0000 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)