Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 2025 16:03:09 GMT
From:      =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: cd245b794186 - main - linuxkpi: Add `kstrtou32()`
Message-ID:  <202501311603.50VG39YO038417@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501311603.50VG39YO038417>