Re: [PATCH] Staging: iio/accel: Changed return type of lis3l02dq_read_event_config() to int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/28/2011 03:59 PM, Andreas Ruprecht wrote:
> The lis3l02dq_read_event_config() function returned an ssize_t up to
> now, which lead to a compiler warning in line 660 (initialization from
> incompatible pointer type). The iio_info struct is defined to accept an
> int-returning function as the read_event_config parameter.
> 
> Also it seems odd to have the check for (ret < 0) and return ret in
> this case, when the return type is signed.
> 
> Signed-off-by: Andreas Ruprecht <rupran@xxxxxxxxxxxx>
Acked-by: Jonathan Cameron <jic23@xxxxxxxxxx>
> ---
>  drivers/staging/iio/accel/lis3l02dq_core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c
> index 5566809..c6da651 100644
> --- a/drivers/staging/iio/accel/lis3l02dq_core.c
> +++ b/drivers/staging/iio/accel/lis3l02dq_core.c
> @@ -534,7 +534,7 @@ static struct iio_chan_spec lis3l02dq_channels[] = {
>  };
>  
>  
> -static ssize_t lis3l02dq_read_event_config(struct iio_dev *indio_dev,
> +static int lis3l02dq_read_event_config(struct iio_dev *indio_dev,
>  					   u64 event_code)
>  {
>  

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux