git: bf1c000e6305 - stable/14 - linuxkpi: Add `kstrtou32()`

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Mon, 12 Jan 2026 17:19:26 UTC
The branch stable/14 has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=bf1c000e630524b476b931a60154adef4de120a0

commit bf1c000e630524b476b931a60154adef4de120a0
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2024-12-22 15:33:04 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-01-11 02:30:30 +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
    
    (cherry picked from commit cd245b79418638e0fa8dc4027275ef5da9039993)
---
 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)
 {