Skip to contentSkip to conversation

iio: temperature: fix non static symbol warnings

PATCH Applied Wei Yongjun 3 participants 3 messages Aug 26, 2016 – Aug 29, 2016 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: temperature: fix non static symbol warnings

From: Wei Yongjun <[email protected]>

Fixes the following sparse warnings:

drivers/iio/temperature/maxim_thermocouple.c:35:28: warning:
symbol 'max6675_channels' was not declared. Should it be static?
drivers/iio/temperature/maxim_thermocouple.c:52:28: warning:
symbol 'max31855_channels' was not declared. Should it be static?
drivers/iio/temperature/maxim_thermocouple.c:98:38: warning:
symbol 'maxim_thermocouple_chips' was not declared. Should it be static?

---
 drivers/iio/temperature/maxim_thermocouple.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/temperature/maxim_thermocouple.c +3 -3
index 030827e..39dd202 100644
@@ -32,7 +32,7 @@ enum {
 	MAX31855,
 };
 
-const struct iio_chan_spec max6675_channels[] = {
+static const struct iio_chan_spec max6675_channels[] = {
 	{	/* thermocouple temperature */
 		.type = IIO_TEMP,
 		.info_mask_separate =
@@ -49,7 +49,7 @@ const struct iio_chan_spec max6675_channels[] = {
 	IIO_CHAN_SOFT_TIMESTAMP(1),
 };
 
-const struct iio_chan_spec max31855_channels[] = {
+static const struct iio_chan_spec max31855_channels[] = {
 	{	/* thermocouple temperature */
 		.type = IIO_TEMP,
 		.address = 2,
@@ -95,7 +95,7 @@ struct maxim_thermocouple_chip {
 	u32 status_bit;
 };
 
-const struct maxim_thermocouple_chip maxim_thermocouple_chips[] = {
+static const struct maxim_thermocouple_chip maxim_thermocouple_chips[] = {
 	[MAX6675] = {
 			.channels = max6675_channels,
 			.num_channels = ARRAY_SIZE(max6675_channels),
Reviewed-by on v1 1/1
#1 lore raw

drivers/iio/te=

Quoted 19 lines · Wei Yongjun

=20
From: Wei Yongjun <[email protected]>
=20
Fixes the following sparse warnings:
=20
drivers/iio/temperature/maxim_thermocouple.c:35:28: warning:
symbol 'max6675_channels' was not declared. Should it be static? drivers/iio/temperature/maxim_thermocouple.c:52:28: warning:
symbol 'max31855_channels' was not declared. Should it be static? drivers/iio/temperature/maxim_thermocouple.c:98:38: warning:
symbol 'maxim_thermocouple_chips' was not declared. Should it be static? =20

---
drivers/iio/temperature/maxim_thermocouple.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)

=20

drivers/iio/te= renamed from drivers/iio/temperature/maxim_thermocouple.c +0 -0

mperature/maxim_thermocouple.c

Quoted 25 lines

index 030827e..39dd202 100644

drivers/iio/temperature/maxim_thermocouple.c +0 -0
@@ -32,7 +32,7 @@ enum {
   MAX31855,
 };

=20

drivers/iio/temperature/maxim_thermocouple.c +1 -1
-const struct iio_chan_spec max6675_channels[] =3D {
+static const struct iio_chan_spec max6675_channels[] =3D {
   {    /* thermocouple temperature */
       .type =3D IIO_TEMP,
       .info_mask_separate =3D
@@ -49,7 +49,7 @@ const struct iio_chan_spec max6675_channels[] =3D {
   IIO_CHAN_SOFT_TIMESTAMP(1),
 };

=20

drivers/iio/temperature/maxim_thermocouple.c +1 -1
-const struct iio_chan_spec max31855_channels[] =3D {
+static const struct iio_chan_spec max31855_channels[] =3D {
   {    /* thermocouple temperature */
       .type =3D IIO_TEMP,
       .address =3D 2,
@@ -95,7 +95,7 @@ struct maxim_thermocouple_chip {
   u32 status_bit;
 };

=20

drivers/iio/temperature/maxim_thermocouple.c

Quoted 2 lines
drivers/iio/temperature/maxim_thermocouple.c +1 -1
-const struct maxim_thermocouple_chip maxim_thermocouple_chips[] =3D {
+static const struct maxim_thermocouple_chip maxim_thermocouple_chips[] =3D=

{

Quoted 6 lines
   [MAX6675] =3D {
           .channels =3D max6675_channels,
           .num_channels =3D ARRAY_SIZE(max6675_channels),

=20
=20
=20

maintainer Applied
#2 lore raw
Quoted 1 line · Matt Ranostay

Applied to the togreg branch of iio.git.
This will be initially pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 58 lines
Quoted 45 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fixes the following sparse warnings:

drivers/iio/temperature/maxim_thermocouple.c:35:28: warning:
symbol 'max6675_channels' was not declared. Should it be static? drivers/iio/temperature/maxim_thermocouple.c:52:28: warning:
symbol 'max31855_channels' was not declared. Should it be static? drivers/iio/temperature/maxim_thermocouple.c:98:38: warning:
symbol 'maxim_thermocouple_chips' was not declared. Should it be static?

---
drivers/iio/temperature/maxim_thermocouple.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/temperature/maxim_thermocouple.c +2 -2
index 030827e..39dd202 100644
@@ -32,7 +32,7 @@ enum {
   MAX31855,
 };
 
-const struct iio_chan_spec max6675_channels[] = {
+static const struct iio_chan_spec max6675_channels[] = {
   {    /* thermocouple temperature */
       .type = IIO_TEMP,
       .info_mask_separate =
@@ -49,7 +49,7 @@ const struct iio_chan_spec max6675_channels[] = {
   IIO_CHAN_SOFT_TIMESTAMP(1),
 };
 
-const struct iio_chan_spec max31855_channels[] = {
+static const struct iio_chan_spec max31855_channels[] = {
   {    /* thermocouple temperature */
       .type = IIO_TEMP,
       .address = 2,

drivers/iio/temperature/maxim_thermocouple.c struct maxim_thermocouple_chip { · line 101

Quoted 8 lines
drivers/iio/temperature/maxim_thermocouple.c +1 -1
@@ -95,7 +95,7 @@ struct maxim_thermocouple_chip {
   u32 status_bit;
 };
 
-const struct maxim_thermocouple_chip maxim_thermocouple_chips[] = {
+static const struct maxim_thermocouple_chip maxim_thermocouple_chips[] = {
   [MAX6675] = {
           .channels = max6675_channels,
           .num_channels = ARRAY_SIZE(max6675_channels),

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html