linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: dac: set varaiable max5522_channels storage-class-specifier to static
@ 2023-04-04  1:38 Tom Rix
  2023-04-04  6:43 ` Nuno Sá
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rix @ 2023-04-04  1:38 UTC (permalink / raw)
  To: jic23, lars, angelo.dureghello; +Cc: linux-iio, linux-kernel, Tom Rix

smatch reports
drivers/iio/dac/max5522.c:55:28: warning: symbol
  'max5522_channels' was not declared. Should it be static?

This variable is only used in one file so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/iio/dac/max5522.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/max5522.c b/drivers/iio/dac/max5522.c
index 00ba4e98fb9c..05034a306597 100644
--- a/drivers/iio/dac/max5522.c
+++ b/drivers/iio/dac/max5522.c
@@ -52,7 +52,7 @@ struct max5522_state {
 	} \
 }
 
-const struct iio_chan_spec max5522_channels[] = {
+static const struct iio_chan_spec max5522_channels[] = {
 	MAX5522_CHANNEL(0),
 	MAX5522_CHANNEL(1),
 };
-- 
2.27.0


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

* Re: [PATCH] iio: dac: set varaiable max5522_channels storage-class-specifier to static
  2023-04-04  1:38 [PATCH] iio: dac: set varaiable max5522_channels storage-class-specifier to static Tom Rix
@ 2023-04-04  6:43 ` Nuno Sá
  2023-04-07 18:01   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Nuno Sá @ 2023-04-04  6:43 UTC (permalink / raw)
  To: Tom Rix, jic23, lars, angelo.dureghello; +Cc: linux-iio, linux-kernel

On Mon, 2023-04-03 at 21:38 -0400, Tom Rix wrote:
> smatch reports
> drivers/iio/dac/max5522.c:55:28: warning: symbol
>   'max5522_channels' was not declared. Should it be static?
> 
> This variable is only used in one file so it should be static.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---

Reviewed-by: Nuno Sa <nuno.sa@analog.com>



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

* Re: [PATCH] iio: dac: set varaiable max5522_channels storage-class-specifier to static
  2023-04-04  6:43 ` Nuno Sá
@ 2023-04-07 18:01   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2023-04-07 18:01 UTC (permalink / raw)
  To: Nuno Sá; +Cc: Tom Rix, lars, angelo.dureghello, linux-iio, linux-kernel

On Tue, 04 Apr 2023 08:43:32 +0200
Nuno Sá <noname.nuno@gmail.com> wrote:

> On Mon, 2023-04-03 at 21:38 -0400, Tom Rix wrote:
> > smatch reports
> > drivers/iio/dac/max5522.c:55:28: warning: symbol
> >   'max5522_channels' was not declared. Should it be static?
> > 
> > This variable is only used in one file so it should be static.
> > 
> > Signed-off-by: Tom Rix <trix@redhat.com>
> > ---  
> 
> Reviewed-by: Nuno Sa <nuno.sa@analog.com>
> 
> 

Applied to the togreg branch of iio.git (pushed out initially as testing)
with tweak in patch title to fix "variable"

Thanks,

Jonathan

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

end of thread, other threads:[~2023-04-07 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04  1:38 [PATCH] iio: dac: set varaiable max5522_channels storage-class-specifier to static Tom Rix
2023-04-04  6:43 ` Nuno Sá
2023-04-07 18:01   ` 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).