linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	Bryan Freed <bfreed@chromium.org>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] Staging: iio/light/tsl2563: fix compile warning
Date: Thu, 06 Oct 2011 12:11:29 +0100	[thread overview]
Message-ID: <4E8D8CE1.4070201@cam.ac.uk> (raw)
In-Reply-To: <20111006061536.GB14701@elgon.mountain>

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


      reply	other threads:[~2011-10-06 11:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E8D8CE1.4070201@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=Michael.Hennerich@analog.com \
    --cc=arnd@arndb.de \
    --cc=bfreed@chromium.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).