diff options
author | Nathan Chancellor <nathan@kernel.org> | 2024-09-10 10:22:54 -0700 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-09-30 09:20:54 +0100 |
commit | cd8247cd41bc983398f5eb572f660752adfe7a1a (patch) | |
tree | fbb111fbab73c9e96bf8cbc445d9518ef5f44479 /tools/perf/scripts/python/net_dropmonitor.py | |
parent | 9de32f48c5896e033b78a31da59a6594a805753f (diff) |
iio: bmi323: Drop CONFIG_PM guards around runtime functions
When building with clang and CONFIG_PM disabled (such as with s390), it
warns:
drivers/iio/imu/bmi323/bmi323_core.c:121:27: warning: variable 'bmi323_reg_savestate' is not needed and will not be emitted [-Wunneeded-internal-declaration]
121 | static const unsigned int bmi323_reg_savestate[] = {
| ^~~~~~~~~~~~~~~~~~~~
drivers/iio/imu/bmi323/bmi323_core.c:133:27: warning: variable 'bmi323_ext_reg_savestate' is not needed and will not be emitted [-Wunneeded-internal-declaration]
133 | static const unsigned int bmi323_ext_reg_savestate[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
These arrays have no references outside of sizeof(), which will be
evaluated at compile time. To avoid these warnings, remove the CONFIG_PM
ifdef guard and use the RUNTIME_PM_OPS macro to ensure these functions
always appear used to the compiler, which allows the references to the
arrays to be visible as well. This results in no difference in runtime
behavior because bmi323_core_pm_ops is only used when CONFIG_PM is set
with the pm_ptr() macro.
Fixes: b09999ee1e86 ("iio: bmi323: suspend and resume triggering on relevant pm operations")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20240910-iio-bmi323-remove-config_pm-guards-v1-1-0552249207af@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions