Re: [patch 2/2] Staging: iio/light/tsl2563: fix compile warning

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

 



On 10/06/11 07:15, Dan Carpenter wrote:
> This fixes a compile warning:
> drivers/staging/iio/light/tsl2563.c:696:2:
> 	warning: initialization from incompatible pointer type [enabled by default]
> drivers/staging/iio/light/tsl2563.c:696:2:
> 	warning: (near initialization for ‘tsl2563_info.write_event_value’) [enabled by default]
> 
> The tsl2563_write_thresh() function returns zero on success and error
> codes on failure, so nothing is lost by making the return type int
> instead of ssize_t.
You are quite right. This is a silly cut and paste mistake on my part.
Thanks.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Acked-by: Jonathan Cameron <jic23@xxxxxxxxx>
> 
> diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c
> index 8977f58..a5e08b3 100644
> --- a/drivers/staging/iio/light/tsl2563.c
> +++ b/drivers/staging/iio/light/tsl2563.c
> @@ -569,7 +569,7 @@ static int tsl2563_read_thresh(struct iio_dev *indio_dev,
>  	return 0;
>  }
>  
> -static ssize_t tsl2563_write_thresh(struct iio_dev *indio_dev,
> +static int tsl2563_write_thresh(struct iio_dev *indio_dev,
>  				  u64 event_code,
>  				  int val)
>  {
> 

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux