On Wed, Sep 16, 2026 at 10:00 AM <[email protected]> wrote:
>
> 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 <[email protected]>
>
> 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.
>
> > 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
> [ ... ]
> > @@ -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.
>

CONFIG_DRM_USE_DYNAMIC_DEBUG is currently marked BROKEN
so its not happening accidentally,

And the following is guarded by #ifdef, so it wouldnt happen

> 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?
>

that patch has been sent before (by me and others), it hasnt been picked up.
I will send a full set separately,
insisting on it here is cart-before-horse


> --
> Sashiko AI review · 
> https://sashiko.dev/#/patchset/[email protected]?part=8

Reply via email to