[Bug 282479] LinuxKPI: <linux/lockdep.h> lockdep_is_held() user doesn't build after LLVM 19 import

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 01 Nov 2024 20:21:49 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282479

            Bug ID: 282479
           Summary: LinuxKPI: <linux/lockdep.h> lockdep_is_held() user
                    doesn't build after LLVM 19 import
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: 2khramtsov@gmail.com

drm-kmod 5.10-lts branch on -CURRENT:

[...]
--- intel_context_param.o ---
In file included from
/tmp/drm-kmod/drivers/gpu/drm/i915/gt/intel_context_param.c:6:
In file included from /tmp/drm-kmod/drivers/gpu/drm/i915/i915_active.h:10:
/usr/src/sys/compat/linuxkpi/common/include/linux/lockdep.h:86:27: error:
expected ')'
   86 | lockdep_is_held(void *__m __diagused)
      |                           ^
/usr/src/sys/compat/linuxkpi/common/include/linux/lockdep.h:86:16: note: to
match this '('
   86 | lockdep_is_held(void *__m __diagused)
      |                ^
--- intel_engine_heartbeat.o ---
[...]

I've built drm-kmod {5.10,5.15,6.1}-lts and master, GENERIC, GENERIC-NODEBUG
kernels with:

diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h
b/sys/compat/linuxkpi/common/include/linux/lockdep.h
index 70a4e45867f..85878d4100c 100644
--- a/sys/compat/linuxkpi/common/include/linux/lockdep.h
+++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h
@@ -83,7 +83,7 @@ struct pin_cookie {
 #endif

 static __inline bool
-lockdep_is_held(void *__m __diagused)
+lockdep_is_held(void *__m)
 {
 #ifdef INVARIANTS
        struct lock_object *__lock;

-- 
You are receiving this mail because:
You are the assignee for the bug.