Skip to contentSkip to conversation

drivers: iio: mma7660: Fix sparse warning

PATCH In review Sandhya Bankar 2 participants 2 messages Sep 22, 2016 – Sep 24, 2016 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: iio: mma7660: Fix sparse warning

Fixing belows sparse warning :

drivers/iio/accel/mma7660.c:42:11: warning: symbol 'mma7660_nscale' was not declared. Should it be static?

---
 drivers/iio/accel/mma7660.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/mma7660.c +1 -1
index 03beadf..3a40774 100644
@@ -39,7 +39,7 @@
 
 #define MMA7660_SCALE_AVAIL	"0.467142857"
 
-const int mma7660_nscale = 467142857;
+static const int mma7660_nscale = 467142857;
 
 #define MMA7660_CHANNEL(reg, axis) {	\
 	.type = IIO_ACCEL,	\
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 6 lines · Sandhya Bankar

Fixing belows sparse warning :

drivers/iio/accel/mma7660.c:42:11: warning: symbol 'mma7660_nscale' was not declared. Should it be static?

Sorry, I just applied an alternative (later :( ) patch that makes the same change. I'm afraid I tend to read my emails backwards in time to pick up new versions of patches first, so whilst I'd normally apply the first poster's version for this sort of patch I came across the other one and applied it first.

Jonathan

Quoted 18 lines
---
 drivers/iio/accel/mma7660.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/mma7660.c +1 -1
index 03beadf..3a40774 100644
@@ -39,7 +39,7 @@
 
 #define MMA7660_SCALE_AVAIL	"0.467142857"
 
-const int mma7660_nscale = 467142857;
+static const int mma7660_nscale = 467142857;
 
 #define MMA7660_CHANNEL(reg, axis) {	\
 	.type = IIO_ACCEL,	\