IIO: Clean up a couple of warnings that snuck in.
Subsystems (2)
Jonathan Cameron
maintainercover IIO: Clean up a couple of warnings that snuck in.
From: Jonathan Cameron <[email protected]>
I'm not sure how these slipped through my local tests and 0-day. These are definitely shown with W=1, perhaps not without that but IIO is generally W=1 clean.
Jonathan Cameron (2):
iio: test: Mark file local structure arrays static.
iio: light: cm32181: Mark the dev_pm_ops static.
drivers/iio/light/cm32181.c | 2 +- drivers/iio/test/iio-test-rescale.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.37.1
Jonathan Cameron
maintainerPATCH 1/2 iio: test: Mark file local structure arrays static.
From: Jonathan Cameron <[email protected]>
Warning cleanup:
drivers/iio/test/iio-test-rescale.c:32:30: warning: symbol 'scale_cases' was not declared. Should it be static? drivers/iio/test/iio-test-rescale.c:480:30: warning: symbol 'offset_cases' was not declared. Should it be static?
--- drivers/iio/test/iio-test-rescale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/test/iio-test-rescale.c +2 -2
@@ -29,7 +29,7 @@ struct rescale_tc_data {const char *expected_off; }; -const struct rescale_tc_data scale_cases[] = { +static const struct rescale_tc_data scale_cases[] = {/* * Typical use cases */
@@ -477,7 +477,7 @@ const struct rescale_tc_data scale_cases[] = { }, }; -const struct rescale_tc_data offset_cases[] = { +static const struct rescale_tc_data offset_cases[] = {/* * Typical use cases */
Signature · 1 line
2.37.1
Re: [PATCH 1/2] iio: test: Mark file local structure arrays static.
Quoted 8 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Warning cleanup:
drivers/iio/test/iio-test-rescale.c:32:30: warning: symbol 'scale_cases' was not declared. Should it be static?drivers/iio/test/iio-test-rescale.c:480:30: warning: symbol 'offset_cases' was not declared. Should it be static?Signed-off-by Jonathan Cameron <[email protected]>Cc Liam Beguin <[email protected]>
Quoted 29 lines
--- drivers/iio/test/iio-test-rescale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iio/test/iio-test-rescale.c +2
-2@@ -29,7 +29,7 @@ struct rescale_tc_data {const char *expected_off; }; -const struct rescale_tc_data scale_cases[] = { +static const struct rescale_tc_data scale_cases[] = {/* * Typical use cases */ @@ -477,7 +477,7 @@ const struct rescale_tc_data scale_cases[] = { }, }; -const struct rescale_tc_data offset_cases[] = { +static const struct rescale_tc_data offset_cases[] = {/* * Typical use cases */ Signature · 1 line
2.37.1
Jonathan Cameron
maintainerPATCH 2/2 iio: light: cm32181: Mark the dev_pm_ops static.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Only accessed from the local file.
Warning:
drivers/iio/light/cm32181.c:508:1: warning: symbol 'cm32181_pm_ops' was not declared. Should it be static?
--- drivers/iio/light/cm32181.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/cm32181.c +1 -1
@@ -505,7 +505,7 @@ static int cm32181_resume(struct device *dev) cm32181->conf_regs[CM32181_REG_ADDR_CMD]); } -DEFINE_SIMPLE_DEV_PM_OPS (cm32181_pm_ops, cm32181_suspend, cm32181_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(cm32181_pm_ops, cm32181_suspend, cm32181_resume);static const struct of_device_id cm32181_of_match[] = { { .compatible ="capella,cm3218" },
Signature · 1 line
2.37.1
Quoted 6 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
I'm not sure how these slipped through my local tests and 0-day. These are definitely shown with W=1, perhaps not without that but IIO is generally W=1 clean.
Quoted 11 lines
Jonathan Cameron (2):
iio: test: Mark file local structure arrays static.
iio: light: cm32181: Mark thedev_pm_opsstatic.drivers/iio/light/cm32181.c | 2 +- drivers/iio/test/iio-test-rescale.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)--
2.37.1
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 9 lines · On Mon, 8 Aug 2022 11:15:52 +0200 Andy Shevchenko <[email protected]>…
Quoted 6 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
I'm not sure how these slipped through my local tests and 0-day. These are definitely shown with W=1, perhaps not without that but IIO is generally W=1 clean.
Reviewed-by Andy Shevchenko <[email protected]>
Applied. Thanks,
Jonathan
Quoted 14 lines
Quoted 12 lines
Jonathan Cameron (2):
iio: test: Mark file local structure arrays static.
iio: light: cm32181: Mark thedev_pm_opsstatic.drivers/iio/light/cm32181.c | 2 +- drivers/iio/test/iio-test-rescale.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)--
2.37.1