From 30ebda9305d7185fa0553da07d12dcaa37b1a236 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 28 Sep 2019 15:13:08 +0000 Subject: [PATCH] fixed signed compare. --- sys/external/bsd/drm2/include/linux/sched.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/external/bsd/drm2/include/linux/sched.h b/sys/external/bsd/drm2/include/linux/sched.h index 0219238e8ca5..7da2b46ac272 100644 --- a/sys/external/bsd/drm2/include/linux/sched.h +++ b/sys/external/bsd/drm2/include/linux/sched.h @@ -1,4 +1,4 @@ -/* $NetBSD: sched.h,v 1.12 2018/10/23 03:56:47 riastradh Exp $ */ +/* $NetBSD: sched.h,v 1.13 2019/09/28 15:13:08 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -62,7 +62,8 @@ schedule_timeout_uninterruptible(long timeout) if (cold) { unsigned us; if (hz <= 1000) { - unsigned ms = hztoms(MIN(timeout, mstohz(INT_MAX))); + unsigned ms = hztoms(MIN((unsigned long)timeout, + mstohz(INT_MAX))); us = MIN(ms, INT_MAX/1000)*1000; } else if (hz <= 1000000) { us = MIN(timeout, (INT_MAX/1000000)/hz)*hz*1000000;