]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/mm: annotate drm_mm_node_scanned_block() with __maybe_unused
authorJani Nikula <jani.nikula@intel.com>
Tue, 3 Sep 2024 17:34:37 +0000 (20:34 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 4 Sep 2024 09:15:46 +0000 (12:15 +0300)
commit461ed4aad0189eee670c980656de93bf6fa3a3dc
tree5542443a23185bbd4ba9eb61e8afcb87f1e64e4d
parent53bd7c1c0077db533472ae32799157758302ef48
drm/mm: annotate drm_mm_node_scanned_block() with __maybe_unused

Clang build with CONFIG_DRM_DEBUG_MM=n, CONFIG_WERROR=y, and W=1 leads to:

  CC [M]  drivers/gpu/drm/drm_mm.o
../drivers/gpu/drm/drm_mm.c:614:20: error: function 'drm_mm_node_scanned_block' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static inline bool drm_mm_node_scanned_block(const struct drm_mm_node *node)
                   ^

Fix this by annotating drm_mm_node_scanned_block() with __maybe_unused.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240903173437.3212437-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/drm_mm.c