Skip to contentSkip to conversation

iio: dac: set varaiable max5522_channels storage-class-specifier to static

PATCH In review Tom Rix 3 participants 3 messages Apr 4, 2023 – Apr 7, 2023 IIO

lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 iio: dac: set varaiable max5522_channels storage-class-specifier to static

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.

---
 drivers/iio/dac/max5522.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/max5522.c +1 -1
index 00ba4e98fb9c..05034a306597 100644
@@ -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),
 };
Signature · 1 line
2.27.0
Reviewed-by Nuno Sa on v1 1/1
#1 lore raw
Quoted 8 lines · 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.

---

maintainer
#2 lore raw
Quoted 5 lines · On Tue, 04 Apr 2023 08:43:32 +0200 Nuno Sá <[email protected]> wrote:
Quoted 4 lines · Tom Rix

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

Quoted 8 lines
Quoted 4 lines

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

---

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

Thanks,

Jonathan