git: 44d1153ddaf8 - main - LinuxKPI: add umin()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 25 Jan 2026 12:35:53 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=44d1153ddaf8f961520a8f33222b65170196b90e
commit 44d1153ddaf8f961520a8f33222b65170196b90e
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-01-20 22:43:19 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-01-25 12:35:22 +0000
LinuxKPI: add umin()
Add a version of umin() simply using MIN() assuming that the Linux
upstream code properly check that the arguments are unsigned, etc.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D54807
---
sys/compat/linuxkpi/common/include/linux/minmax.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/minmax.h b/sys/compat/linuxkpi/common/include/linux/minmax.h
index d48958f0899f..fb8eb6f704b4 100644
--- a/sys/compat/linuxkpi/common/include/linux/minmax.h
+++ b/sys/compat/linuxkpi/common/include/linux/minmax.h
@@ -71,4 +71,7 @@
b = _swap_tmp; \
} while (0)
+/* XXX would have to make sure both are unsigned. */
+#define umin(x, y) MIN(x, y)
+
#endif /* _LINUXKPI_LINUX_MINMAX_H_ */