linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/2] Staging: iio/light/tsl2563: fix compile warning
@ 2011-10-06  6:15 Dan Carpenter
  2011-10-06 11:11 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-10-06  6:15 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Greg Kroah-Hartman, Bryan Freed, Michael Hennerich, Arnd Bergmann,
	linux-iio, devel, kernel-janitors

This fixes a compile warning:
drivers/staging/iio/light/tsl2563.c:696:2:
	warning: initialization from incompatible pointer type [enabled by defau=
lt]
drivers/staging/iio/light/tsl2563.c:696:2:
	warning: (near initialization for =E2=80=98tsl2563_info.write_event_valu=
e=E2=80=99) [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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/li=
ght/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;
 }
=20
-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)
 {

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

* Re: [patch 2/2] Staging: iio/light/tsl2563: fix compile warning
  2011-10-06  6:15 [patch 2/2] Staging: iio/light/tsl2563: fix compile warning Dan Carpenter
@ 2011-10-06 11:11 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2011-10-06 11:11 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Bryan Freed, Michael Hennerich, Arnd Bergmann,
	linux-iio, devel, kernel-janitors

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 d=
efault]
> drivers/staging/iio/light/tsl2563.c:696:2:
> 	warning: (near initialization for =E2=80=98tsl2563_info.write_event_=
value=E2=80=99) [enabled by default]
>=20
> 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.
>=20
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
>=20
> diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/ii=
o/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 *in=
dio_dev,
>  	return 0;
>  }
> =20
> -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)
>  {
>=20


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

end of thread, other threads:[~2011-10-06 11:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-06  6:15 [patch 2/2] Staging: iio/light/tsl2563: fix compile warning Dan Carpenter
2011-10-06 11:11 ` 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).