Thread (56 messages) 56 messages, 3 authors, 28d ago

Re: [PATCH v9 08/39] dyndbg: add stub macro for DECLARE_DYNDBG_CLASSMAP

flat view

From: sashiko-bot@kernel.org
Date: 2026-09-09 01:10:04
Also in: dri-devel

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Moving DECLARE_DYNDBG_CLASSMAP into the CONFIG_DYNAMIC_DEBUG block causes a build failure in DRM when CONFIG_DYNAMIC_DEBUG is disabled but CONFIG_DYNAMIC_DEBUG_CORE is enabled.
--

commit 0230d1a17999838bd74e9c3bf428293b96fde5ce
Author: Jim Cromie [off-list ref]

dyndbg: add stub macro for DECLARE_DYNDBG_CLASSMAP

This patch adds a stub macro for DECLARE_DYNDBG_CLASSMAP for !DYNAMIC_DEBUG
builds. It moves the original macro definition under the ifdef block to
provide a cleaner starting point for future changes.
quoted hunk ↗ jump to hunk
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 05743900a1169..a10adac8e8f00 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
[ ... ]
quoted hunk ↗ jump to hunk
@@ -314,6 +314,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor,
 
 #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt)
 #define DYNAMIC_DEBUG_BRANCH(descriptor) false
+#define DECLARE_DYNDBG_CLASSMAP(...)
[Severity: Low]
Does this empty stub cause a build failure in DRM when compiling with
CONFIG_DYNAMIC_DEBUG=n, CONFIG_DYNAMIC_DEBUG_CORE=y, and
CONFIG_DRM_USE_DYNAMIC_DEBUG=y?

Because DYNAMIC_DEBUG_MODULE is missing for drm_print.c in this configuration,
the stub macro is used. This causes drm_debug_classes to be undeclared when
drm_debug_bitmap() attempts to reference it:

drivers/gpu/drm/drm_print.c:drm_debug_bitmap() {
    ...
    .map = &drm_debug_classes,
    ...
}

Could this empty stub be updated to properly declare the struct pointer even
when the debug features are disabled?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908-dd-cmap-part2-clean-v9-0-3a3f621f4a10@gmail.com?part=8
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help