From: Jani Nikula Date: Tue, 3 Sep 2024 17:34:37 +0000 (+0300) Subject: drm/mm: annotate drm_mm_node_scanned_block() with __maybe_unused X-Git-Tag: v6.13-rc1~122^2~23^2~112 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=461ed4aad0189eee670c980656de93bf6fa3a3dc;p=thirdparty%2Flinux.git 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 Reviewed-by: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20240903173437.3212437-1-jani.nikula@intel.com Signed-off-by: Jani Nikula --- diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 1ed68d3cd80ba..ca254611b3823 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -611,7 +611,7 @@ int drm_mm_insert_node_in_range(struct drm_mm * const mm, } EXPORT_SYMBOL(drm_mm_insert_node_in_range); -static inline bool drm_mm_node_scanned_block(const struct drm_mm_node *node) +static inline __maybe_unused bool drm_mm_node_scanned_block(const struct drm_mm_node *node) { return test_bit(DRM_MM_NODE_SCANNED_BIT, &node->flags); }