Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Feb 2022 00:13:18 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d17b78aa142d - main - LinuxKPI: add __ffs64()
Message-ID:  <202202140013.21E0DIvL069787@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

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

commit d17b78aa142d7c63490c7a2c3f202ef99fffad70
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2022-02-09 11:43:33 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2022-02-14 00:12:09 +0000

    LinuxKPI: add __ffs64()
    
    Add __ffs64() to linux/bitops.h needed by a driver.
    
    Reviewed by:    hselasky
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D34225
---
 sys/compat/linuxkpi/common/include/linux/bitops.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h
index 262e6b9b110f..b6c54b2e6858 100644
--- a/sys/compat/linuxkpi/common/include/linux/bitops.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitops.h
@@ -86,6 +86,12 @@ __ffsl(long mask)
 	return (ffsl(mask) - 1);
 }
 
+static inline unsigned long
+__ffs64(uint64_t mask)
+{
+	return (ffsll(mask) - 1);
+}
+
 static inline int
 __flsl(long mask)
 {



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