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.

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/[email protected]?part=8

Reply via email to