]> git.baikalelectronics.ru Git - kernel.git/commit
coresight: etm4x: Fix unused function warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 13 Dec 2019 22:31:07 +0000 (15:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 14:38:28 +0000 (15:38 +0100)
commit1d90d987b6abe481ca483c1712b76ed45b58952b
tree4664d9df38cc4aa90e4c74fb33f1d69784ec4a4b
parentf1900be5a74dbaa08f19e3aaa9fd854e846d520c
coresight: etm4x: Fix unused function warning

Some of the newly added code in the etm4x driver is inside of an #ifdef,
and some other code is outside of it, leading to a harmless warning when
CONFIG_CPU_PM is disabled:

drivers/hwtracing/coresight/coresight-etm4x.c:68:13: error: 'etm4_os_lock' defined but not used [-Werror=unused-function]
 static void etm4_os_lock(struct etmv4_drvdata *drvdata)
             ^~~~~~~~~~~~

To avoid the warning and simplify the the #ifdef checks, use
IS_ENABLED() instead, so the compiler can drop the unused functions
without complaining.

Fixes: ae0761b2bf59 ("coresight: etm4x: Save/restore state across CPU low power states")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[Fixed capital 'f' in title]
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20191213223107.1484-2-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etm4x.c