* [PATCH -next] iio: temperature: fix non static symbol warnings
@ 2016-08-26 14:33 Wei Yongjun
2016-08-27 8:51 ` Matt Ranostay
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2016-08-26 14:33 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Matt Ranostay
Cc: Wei Yongjun, linux-iio
From: Wei Yongjun <weiyongjun1@huawei.com>
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?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/iio/temperature/maxim_thermocouple.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/temperature/maxim_thermocouple.c
index 030827e..39dd202 100644
--- a/drivers/iio/temperature/maxim_thermocouple.c
+++ b/drivers/iio/temperature/maxim_thermocouple.c
@@ -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),
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] iio: temperature: fix non static symbol warnings
2016-08-26 14:33 [PATCH -next] iio: temperature: fix non static symbol warnings Wei Yongjun
@ 2016-08-27 8:51 ` Matt Ranostay
2016-08-29 18:49 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Matt Ranostay @ 2016-08-27 8:51 UTC (permalink / raw)
To: Wei Yongjun
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Wei Yongjun, linux-iio
Reviewed-By: Matt Ranostay <mranostay@gmail.com>
> On Aug 26, 2016, at 07:33, Wei Yongjun <weiyj.lk@gmail.com> wrote:
>=20
> From: Wei Yongjun <weiyongjun1@huawei.com>
>=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
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/iio/temperature/maxim_thermocouple.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>=20
> diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/te=
mperature/maxim_thermocouple.c
> index 030827e..39dd202 100644
> --- a/drivers/iio/temperature/maxim_thermocouple.c
> +++ b/drivers/iio/temperature/maxim_thermocouple.c
> @@ -32,7 +32,7 @@ enum {
> MAX31855,
> };
>=20
> -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
> -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
> -const struct maxim_thermocouple_chip maxim_thermocouple_chips[] =3D {
> +static const struct maxim_thermocouple_chip maxim_thermocouple_chips[] =3D=
{
> [MAX6675] =3D {
> .channels =3D max6675_channels,
> .num_channels =3D ARRAY_SIZE(max6675_channels),
>=20
>=20
>=20
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] iio: temperature: fix non static symbol warnings
2016-08-27 8:51 ` Matt Ranostay
@ 2016-08-29 18:49 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2016-08-29 18:49 UTC (permalink / raw)
To: Matt Ranostay, Wei Yongjun
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
Wei Yongjun, linux-iio
On 27/08/16 09:51, Matt Ranostay wrote:
> Reviewed-By: Matt Ranostay <mranostay@gmail.com>
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
>
>> On Aug 26, 2016, at 07:33, Wei Yongjun <weiyj.lk@gmail.com> wrote:
>>
>> From: Wei Yongjun <weiyongjun1@huawei.com>
>>
>> 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?
>>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>> ---
>> drivers/iio/temperature/maxim_thermocouple.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/temperature/maxim_thermocouple.c
>> index 030827e..39dd202 100644
>> --- a/drivers/iio/temperature/maxim_thermocouple.c
>> +++ b/drivers/iio/temperature/maxim_thermocouple.c
>> @@ -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),
>>
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-29 18:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-26 14:33 [PATCH -next] iio: temperature: fix non static symbol warnings Wei Yongjun
2016-08-27 8:51 ` Matt Ranostay
2016-08-29 18: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).