All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: mma9551: fix sparse warning
@ 2014-12-15 15:16 Vlad Dogaru
  2014-12-15 16:30 ` Tirdea, Irina
  0 siblings, 1 reply; 3+ messages in thread
From: Vlad Dogaru @ 2014-12-15 15:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Vlad Dogaru

sparse warnings: (new ones prefixed by >>)

>> drivers/iio/accel/mma9551.c:554:57: sparse: mixing different enum types
   drivers/iio/accel/mma9551.c:554:57:     int enum mma9551_tilt_axis  versus
   drivers/iio/accel/mma9551.c:554:57:     int enum mma9551_gpio_pin
>> drivers/iio/accel/mma9551.c:576:57: sparse: mixing different enum types
   drivers/iio/accel/mma9551.c:576:57:     int enum mma9551_tilt_axis  versus
   drivers/iio/accel/mma9551.c:576:57:     int enum mma9551_gpio_pin

Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
---
 drivers/iio/accel/mma9551.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c
index 1be125b..6563e26 100644
--- a/drivers/iio/accel/mma9551.c
+++ b/drivers/iio/accel/mma9551.c
@@ -551,7 +551,8 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
 		return 0;
 
 	if (state == 0) {
-		ret = mma9551_gpio_config(data->client, mma_axis,
+		ret = mma9551_gpio_config(data->client,
+					  (enum mma9551_gpio_pin)mma_axis,
 					  MMA9551_APPID_NONE, 0, 0);
 		if (ret < 0)
 			return ret;
@@ -573,7 +574,8 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
 			return -EINVAL;
 		}
 
-		ret = mma9551_gpio_config(data->client, mma_axis,
+		ret = mma9551_gpio_config(data->client,
+					  (enum mma9551_gpio_pin)mma_axis,
 					  MMA9551_APPID_TILT, bitnum, 0);
 		if (ret < 0)
 			return ret;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] iio: mma9551: fix sparse warning
  2014-12-15 15:16 [PATCH] iio: mma9551: fix sparse warning Vlad Dogaru
@ 2014-12-15 16:30 ` Tirdea, Irina
  2014-12-26 12:14   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Tirdea, Irina @ 2014-12-15 16:30 UTC (permalink / raw)
  To: Dogaru, Vlad, linux-iio; +Cc: Dogaru, Vlad



> -----Original Message-----
> From: linux-iio-owner@vger.kernel.org [mailto:linux-iio-owner@vger.kernel.org] On Behalf Of Vlad Dogaru
> Sent: 15 December, 2014 17:17
> To: linux-iio@vger.kernel.org
> Cc: Dogaru, Vlad
> Subject: [PATCH] iio: mma9551: fix sparse warning
> 
> sparse warnings: (new ones prefixed by >>)
> 
> >> drivers/iio/accel/mma9551.c:554:57: sparse: mixing different enum types
>    drivers/iio/accel/mma9551.c:554:57:     int enum mma9551_tilt_axis  versus
>    drivers/iio/accel/mma9551.c:554:57:     int enum mma9551_gpio_pin
> >> drivers/iio/accel/mma9551.c:576:57: sparse: mixing different enum types
>    drivers/iio/accel/mma9551.c:576:57:     int enum mma9551_tilt_axis  versus
>    drivers/iio/accel/mma9551.c:576:57:     int enum mma9551_gpio_pin
> 
> Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> ---

Reviewed-by: Irina Tirdea <irina.tirdea@intel.com>

>  drivers/iio/accel/mma9551.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c
> index 1be125b..6563e26 100644
> --- a/drivers/iio/accel/mma9551.c
> +++ b/drivers/iio/accel/mma9551.c
> @@ -551,7 +551,8 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
>  		return 0;
> 
>  	if (state == 0) {
> -		ret = mma9551_gpio_config(data->client, mma_axis,
> +		ret = mma9551_gpio_config(data->client,
> +					  (enum mma9551_gpio_pin)mma_axis,
>  					  MMA9551_APPID_NONE, 0, 0);
>  		if (ret < 0)
>  			return ret;
> @@ -573,7 +574,8 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
>  			return -EINVAL;
>  		}
> 
> -		ret = mma9551_gpio_config(data->client, mma_axis,
> +		ret = mma9551_gpio_config(data->client,
> +					  (enum mma9551_gpio_pin)mma_axis,
>  					  MMA9551_APPID_TILT, bitnum, 0);
>  		if (ret < 0)
>  			return ret;
> --
> 1.9.1
> 
> --
> 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

* Re: [PATCH] iio: mma9551: fix sparse warning
  2014-12-15 16:30 ` Tirdea, Irina
@ 2014-12-26 12:14   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2014-12-26 12:14 UTC (permalink / raw)
  To: Tirdea, Irina, Dogaru, Vlad, linux-iio

On 15/12/14 16:30, Tirdea, Irina wrote:
> 
> 
>> -----Original Message-----
>> From: linux-iio-owner@vger.kernel.org [mailto:linux-iio-owner@vger.kernel.org] On Behalf Of Vlad Dogaru
>> Sent: 15 December, 2014 17:17
>> To: linux-iio@vger.kernel.org
>> Cc: Dogaru, Vlad
>> Subject: [PATCH] iio: mma9551: fix sparse warning
>>
>> sparse warnings: (new ones prefixed by >>)
>>
>>>> drivers/iio/accel/mma9551.c:554:57: sparse: mixing different enum types
>>    drivers/iio/accel/mma9551.c:554:57:     int enum mma9551_tilt_axis  versus
>>    drivers/iio/accel/mma9551.c:554:57:     int enum mma9551_gpio_pin
>>>> drivers/iio/accel/mma9551.c:576:57: sparse: mixing different enum types
>>    drivers/iio/accel/mma9551.c:576:57:     int enum mma9551_tilt_axis  versus
>>    drivers/iio/accel/mma9551.c:576:57:     int enum mma9551_gpio_pin
>>
>> Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
Applied to the togreg branch of iio.git - initially pushed out as testing
for the autobuilders to play.

Thanks,

Jonathan
>> ---
> 
> Reviewed-by: Irina Tirdea <irina.tirdea@intel.com>
> 
>>  drivers/iio/accel/mma9551.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c
>> index 1be125b..6563e26 100644
>> --- a/drivers/iio/accel/mma9551.c
>> +++ b/drivers/iio/accel/mma9551.c
>> @@ -551,7 +551,8 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
>>  		return 0;
>>
>>  	if (state == 0) {
>> -		ret = mma9551_gpio_config(data->client, mma_axis,
>> +		ret = mma9551_gpio_config(data->client,
>> +					  (enum mma9551_gpio_pin)mma_axis,
>>  					  MMA9551_APPID_NONE, 0, 0);
>>  		if (ret < 0)
>>  			return ret;
>> @@ -573,7 +574,8 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
>>  			return -EINVAL;
>>  		}
>>
>> -		ret = mma9551_gpio_config(data->client, mma_axis,
>> +		ret = mma9551_gpio_config(data->client,
>> +					  (enum mma9551_gpio_pin)mma_axis,
>>  					  MMA9551_APPID_TILT, bitnum, 0);
>>  		if (ret < 0)
>>  			return ret;
>> --
>> 1.9.1
>>
>> --
>> 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
> --
> 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:[~2014-12-26 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15 15:16 [PATCH] iio: mma9551: fix sparse warning Vlad Dogaru
2014-12-15 16:30 ` Tirdea, Irina
2014-12-26 12:14   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.