linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in.
@ 2022-08-07 14:54 Jonathan Cameron
  2022-08-07 14:54 ` [PATCH 1/2] iio: test: Mark file local structure arrays static Jonathan Cameron
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jonathan Cameron @ 2022-08-07 14:54 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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(-)

-- 
2.37.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] iio: test: Mark file local structure arrays static.
  2022-08-07 14:54 [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in Jonathan Cameron
@ 2022-08-07 14:54 ` Jonathan Cameron
  2022-08-07 15:52   ` Liam Beguin
  2022-08-07 14:54 ` [PATCH 2/2] iio: light: cm32181: Mark the dev_pm_ops static Jonathan Cameron
  2022-08-08  9:15 ` [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in Andy Shevchenko
  2 siblings, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2022-08-07 14:54 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Liam Beguin

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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 <Jonathan.Cameron@huawei.com>
Cc: Liam Beguin <liambeguin@gmail.com>
---
 drivers/iio/test/iio-test-rescale.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/test/iio-test-rescale.c b/drivers/iio/test/iio-test-rescale.c
index cc782ccff880..31ee55a6faed 100644
--- a/drivers/iio/test/iio-test-rescale.c
+++ b/drivers/iio/test/iio-test-rescale.c
@@ -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
 	 */
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] iio: light: cm32181: Mark the dev_pm_ops static.
  2022-08-07 14:54 [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in Jonathan Cameron
  2022-08-07 14:54 ` [PATCH 1/2] iio: test: Mark file local structure arrays static Jonathan Cameron
@ 2022-08-07 14:54 ` Jonathan Cameron
  2022-08-08  9:15 ` [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in Andy Shevchenko
  2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2022-08-07 14:54 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Kai-Heng Feng

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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?

Fixes: 68c1b3dd5c48 ("iio: light: cm32181: Add PM support")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/iio/light/cm32181.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
index edbe6a3138d0..001055d09750 100644
--- a/drivers/iio/light/cm32181.c
+++ b/drivers/iio/light/cm32181.c
@@ -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" },
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] iio: test: Mark file local structure arrays static.
  2022-08-07 14:54 ` [PATCH 1/2] iio: test: Mark file local structure arrays static Jonathan Cameron
@ 2022-08-07 15:52   ` Liam Beguin
  0 siblings, 0 replies; 6+ messages in thread
From: Liam Beguin @ 2022-08-07 15:52 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Jonathan Cameron

On Sun, Aug 07, 2022 at 03:54:56PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> 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 <Jonathan.Cameron@huawei.com>
> Cc: Liam Beguin <liambeguin@gmail.com>

Reviewed-by: Liam Beguin <liambeguin@gmail.com>

> ---
>  drivers/iio/test/iio-test-rescale.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/test/iio-test-rescale.c b/drivers/iio/test/iio-test-rescale.c
> index cc782ccff880..31ee55a6faed 100644
> --- a/drivers/iio/test/iio-test-rescale.c
> +++ b/drivers/iio/test/iio-test-rescale.c
> @@ -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
>  	 */
> -- 
> 2.37.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in.
  2022-08-07 14:54 [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in Jonathan Cameron
  2022-08-07 14:54 ` [PATCH 1/2] iio: test: Mark file local structure arrays static Jonathan Cameron
  2022-08-07 14:54 ` [PATCH 2/2] iio: light: cm32181: Mark the dev_pm_ops static Jonathan Cameron
@ 2022-08-08  9:15 ` Andy Shevchenko
  2022-08-13 15:57   ` Jonathan Cameron
  2 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2022-08-08  9:15 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Jonathan Cameron

On Sun, Aug 7, 2022 at 4:50 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> 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 <andy.shevchenko@gmail.com>

> 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(-)
>
> --
> 2.37.1
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in.
  2022-08-08  9:15 ` [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in Andy Shevchenko
@ 2022-08-13 15:57   ` Jonathan Cameron
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2022-08-13 15:57 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-iio, Jonathan Cameron

On Mon, 8 Aug 2022 11:15:52 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Sun, Aug 7, 2022 at 4:50 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > 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 <andy.shevchenko@gmail.com>
Applied. Thanks,

Jonathan

> 
> > 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(-)
> >
> > --
> > 2.37.1
> >  
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-13 15:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-07 14:54 [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in Jonathan Cameron
2022-08-07 14:54 ` [PATCH 1/2] iio: test: Mark file local structure arrays static Jonathan Cameron
2022-08-07 15:52   ` Liam Beguin
2022-08-07 14:54 ` [PATCH 2/2] iio: light: cm32181: Mark the dev_pm_ops static Jonathan Cameron
2022-08-08  9:15 ` [PATCH 0/2] IIO: Clean up a couple of warnings that snuck in Andy Shevchenko
2022-08-13 15:57   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).