summaryrefslogtreecommitdiff
path: root/rust/helpers/bitops.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-10-14 10:59:58 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2025-10-14 10:59:58 +0200
commit48a710760e10a4f36e11233a21860796ba204b1e (patch)
tree16310f153edd77adc24a4f4474697a87147416a6 /rust/helpers/bitops.c
parent7f38a1487555604bc4e210fa7cc9b1bce981c40e (diff)
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
Merge drm/drm-fixes into drm-misc-fixes
Updating drm-misc-fixes to the state of v6.18-rc1. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'rust/helpers/bitops.c')
-rw-r--r--rust/helpers/bitops.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/rust/helpers/bitops.c b/rust/helpers/bitops.c
new file mode 100644
index 000000000000..5d0861d29d3f
--- /dev/null
+++ b/rust/helpers/bitops.c
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/bitops.h>
+
+void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
+{
+ __set_bit(nr, addr);
+}
+
+void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
+{
+ __clear_bit(nr, addr);
+}
+
+void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr)
+{
+ set_bit(nr, addr);
+}
+
+void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr)
+{
+ clear_bit(nr, addr);
+}