]> git.baikalelectronics.ru Git - kernel.git/commit
drm/rockchip: cdn-dp-core: Make cdn_dp_core_resume __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Tue, 28 Apr 2020 21:31:24 +0000 (23:31 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Sep 2021 19:02:33 +0000 (12:02 -0700)
commitdb21dc631ee0b8f24cab19e4b126d20832aaac9a
tree9cb48e4e955054c6ed2b910fa04cd37ab53be5f8
parentb50e5514c6c1ef19a46cb7a9583d72119ed98cb4
drm/rockchip: cdn-dp-core: Make cdn_dp_core_resume __maybe_unused

With the new static annotation, the compiler warns when the functions
are actually unused:

   drivers/gpu/drm/rockchip/cdn-dp-core.c:1123:12: error: 'cdn_dp_resume' defined but not used [-Werror=unused-function]
    1123 | static int cdn_dp_resume(struct device *dev)
         |            ^~~~~~~~~~~~~

Mark them __maybe_unused to suppress that warning as well.

[ Not so 'new' static annotations any more, and I removed the part of
  the patch that added __maybe_unused to cdn_dp_suspend(), because it's
  used by the shutdown/remove code.

  So only the resume function ends up possibly unused if CONFIG_PM isn't
  set     - Linus ]

Fixes: 30f1e75d72a6 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpu/drm/rockchip/cdn-dp-core.c