git: cd245b794186 - main - linuxkpi: Add `kstrtou32()`
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 31 Jan 2025 16:03:09 UTC
The branch main has been updated by dumbbell:
URL: https://cgit.FreeBSD.org/src/commit/?id=cd245b79418638e0fa8dc4027275ef5da9039993
commit cd245b79418638e0fa8dc4027275ef5da9039993
Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2024-12-22 15:33:04 +0000
Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2025-01-31 16:00:47 +0000
linuxkpi: Add `kstrtou32()`
[Why]
This is used by the amdgpu DRM driver in Linux 6.7.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48744
---
sys/compat/linuxkpi/common/include/linux/kstrtox.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/kstrtox.h b/sys/compat/linuxkpi/common/include/linux/kstrtox.h
index 0567aa99f7a4..5da99de24197 100644
--- a/sys/compat/linuxkpi/common/include/linux/kstrtox.h
+++ b/sys/compat/linuxkpi/common/include/linux/kstrtox.h
@@ -179,6 +179,13 @@ kstrtou32(const char *cp, unsigned int base, uint32_t *res)
return (kstrtouint(cp, base, res));
}
+static inline int
+kstrtos32(const char *cp, unsigned int base, int32_t *res)
+{
+
+ return (kstrtoint(cp, base, res));
+}
+
static inline int
kstrtos64(const char *cp, unsigned int base, int64_t *res)
{