* [PATCH] drivers: iio: mma7660: Fix sparse warning
@ 2016-09-22 20:44 Sandhya Bankar
2016-09-24 16:49 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Sandhya Bankar @ 2016-09-22 20:44 UTC (permalink / raw)
To: jic23, knaack.h, linux-iio, lars, pmeerw
Fixing belows sparse warning :
drivers/iio/accel/mma7660.c:42:11: warning: symbol 'mma7660_nscale'
was not declared. Should it be static?
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
drivers/iio/accel/mma7660.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/mma7660.c b/drivers/iio/accel/mma7660.c
index 03beadf..3a40774 100644
--- a/drivers/iio/accel/mma7660.c
+++ b/drivers/iio/accel/mma7660.c
@@ -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, \
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: iio: mma7660: Fix sparse warning
2016-09-22 20:44 [PATCH] drivers: iio: mma7660: Fix sparse warning Sandhya Bankar
@ 2016-09-24 16:49 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-09-24 16:49 UTC (permalink / raw)
To: Sandhya Bankar, knaack.h, linux-iio, lars, pmeerw
On 22/09/16 21:44, Sandhya Bankar wrote:
> Fixing belows sparse warning :
>
> drivers/iio/accel/mma7660.c:42:11: warning: symbol 'mma7660_nscale'
> was not declared. Should it be static?
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
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
> ---
> drivers/iio/accel/mma7660.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/mma7660.c b/drivers/iio/accel/mma7660.c
> index 03beadf..3a40774 100644
> --- a/drivers/iio/accel/mma7660.c
> +++ b/drivers/iio/accel/mma7660.c
> @@ -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, \
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-24 16:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22 20:44 [PATCH] drivers: iio: mma7660: Fix sparse warning Sandhya Bankar
2016-09-24 16:49 ` 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).