drm/mm: annotate drm_mm_node_scanned_block() with __maybe_unused
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/drm_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_mm.c +1 -1
@@ -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); }
Signature · 1 line
2.39.2
Quoted 9 lines · Jani Nikula
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 booldrm_mm_node_scanned_block(const struct drm_mm_node *node)^Fix this by annotating
drm_mm_node_scanned_block()with__maybe_unused.
FWIW,
Signature · 2 lines
With Best Regards, Andy Shevchenko
Jani Nikula
AppliedQuoted 9 lines · Andy Shevchenko
Quoted 8 lines · Jani Nikula
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 booldrm_mm_node_scanned_block(const struct drm_mm_node *node)^
Quoted 4 lines
Quoted 1 line
Fix this by annotating
drm_mm_node_scanned_block()with__maybe_unused.FWIW,
Reviewed-by Andy Shevchenko <[email protected]>
Pushed to drm-misc-next, thanks for the review.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel