]> git.baikalelectronics.ru Git - kernel.git/commit
amba: tegra-ahb: Mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Fri, 26 Apr 2019 14:56:03 +0000 (16:56 +0200)
committerThierry Reding <treding@nvidia.com>
Wed, 8 May 2019 12:40:39 +0000 (14:40 +0200)
commitb1eb4ca412132fb3accad5f4ca480ca0c5908144
treea51f1087ffdc0f6a22a68078a3fd42d4cdb57508
parenta6a86594d1953b6c45ac0fa465a1190caa24cf8e
amba: tegra-ahb: Mark PM functions as __maybe_unused

clang warns about an unused variable when CONFIG_PM is disabled, since
it is only referenced from an #ifdef:

drivers/amba/tegra-ahb.c:97:18: error: variable 'tegra_ahb_gizmo' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]

Rather than trying to get the #ifdef right, remove it and use
__maybe_unused here, which is less error prone.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/amba/tegra-ahb.c