Thread (52 messages) flat view 52 messages, 2 authors, 3d ago

Re: [PATCH v10 08/38] dyndbg: add stub macro for DECLARE_DYNDBG_CLASSMAP

From: sashiko-bot@kernel.org
Date: 2026-09-16 16:00:22
Also in: dri-devel

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] drm: compilation failure due to DECLARE_DYNDBG_CLASSMAP stub
--

commit 96b109d4ffa1bfc809c49d548861d8dd8aa48aaf
Author: Jim Cromie [off-list ref]

dyndbg: add stub macro for DECLARE_DYNDBG_CLASSMAP

This commit moves the DECLARE_DYNDBG_CLASSMAP macro definition inside the
DYNAMIC_DEBUG ifdef block. It also adds an empty stub macro for builds
without dynamic debug enabled 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 lead to a compilation failure in the DRM subsystem?

In drivers/gpu/drm/Makefile, CFLAGS is used but ignored by Kbuild for
subdirectories, meaning DYNAMIC_DEBUG_MODULE is never actually defined
for the DRM subsystem. Before this patch, DECLARE_DYNDBG_CLASSMAP was
defined unconditionally, which masked the Kbuild typo.

When CONFIG_DYNAMIC_DEBUG=n, CONFIG_DYNAMIC_DEBUG_CORE=y, and
CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this empty stub is used because
DYNAMIC_DEBUG_MODULE is undefined. This causes DECLARE_DYNDBG_CLASSMAP
to expand to nothing.

As a result, drm_print.c attempts to reference the undeclared
drm_debug_classes variable, causing a build regression:

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

Would it be possible to handle the stub expansion differently or update
the DRM Makefile to use ccflags-y instead?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260916-dd-cmap-part2-clean-v10-0-af4cf4767707@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