Date: Mon, 26 Jun 2023 07:55:09 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 08bc2cc4c4d8 - main - LinuxKPI: cast jiffies_to_msecs() result Message-ID: <202306260755.35Q7t9dt067193@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=08bc2cc4c4d8e94ad1db63f97d923dee18bee668 commit 08bc2cc4c4d8e94ad1db63f97d923dee18bee668 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-06-10 22:57:27 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-06-26 07:54:24 +0000 LinuxKPI: cast jiffies_to_msecs() result jiffies_to_msecs() is expected to return an uint_t. In order to avoid changing printf format strings, properly cast the result to the expected type. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40486 --- sys/compat/linuxkpi/common/include/linux/jiffies.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/jiffies.h b/sys/compat/linuxkpi/common/include/linux/jiffies.h index 76c9c6a749c1..1aca3e2f33be 100644 --- a/sys/compat/linuxkpi/common/include/linux/jiffies.h +++ b/sys/compat/linuxkpi/common/include/linux/jiffies.h @@ -40,7 +40,7 @@ #define jiffies ticks #define jiffies_64 ticks -#define jiffies_to_msecs(x) (((int64_t)(int)(x)) * 1000 / hz) +#define jiffies_to_msecs(x) ((unsigned int)(((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?202306260755.35Q7t9dt067193>