linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
To: "Lars-Peter Clausen" <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org, jic23@cam.ac.uk,
	Thorsten Nowak <thorsten.nowak@iis.fraunhofer.de>
Subject: Re: [PATCH V3] iio: gyro: Add itg3200
Date: Thu, 31 Jan 2013 19:37:10 +0100	[thread overview]
Message-ID: <201301311937.10124.manuel.stahl@iis.fraunhofer.de> (raw)
In-Reply-To: <510A8BF6.2070701@metafoo.de>

Am Donnerstag, 31. Januar 2013, 16:21:26 schrieb Lars-Peter Clausen:
> On 01/31/2013 01:17 PM, Manuel Stahl wrote:
> > Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
> 
> Having at least a short commit message wouldn't hurt. E.g. something along
> the lines of: "This patch adds support for the InvenSense itg3200. The
> itg3200 is a three-axis gyro and ..."

OK, no problem.
 
> I get one build warning:
> 	CC      drivers/iio/gyro/itg3200_core.o
> 	drivers/iio/gyro/itg3200_core.c:302: warning: initialization from
> 	incompatible pointer type

[...]

> > +static ssize_t itg3200_read_raw(struct iio_dev *indio_dev,
> 
> This triggers the build warning, the return type should be int.
> 
> > +		const struct iio_chan_spec *chan,
> > +		int *val, int *val2, long info)
> > +{
> > +	ssize_t ret = 0;
> 
> What I meant with the comment in my previous mail was make ret int.

Sorry, I should do more exhaustive tests...

[...]

> > +static int itg3200_probe(struct i2c_client *client,
> > +		const struct i2c_device_id *id)
> > +{
> > +	int ret;
> > +	struct itg3200 *st;
> > +	struct iio_dev *indio_dev;
> > +	const unsigned long avail_scan_masks[] = { 0xffffffff, 0x0 };
> 
> This needs to be static. Right now it is on the stack and well gone after
> probe has been run.

Is it OK to make it static inside itg3200_probe() or should it be global?


-- 
Regards,
Manuel Stahl

  reply	other threads:[~2013-01-31 18:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17  8:27 [PATCH 1/1] staging: iio: Integration gyroscope itg3200 Thorsten Nowak
2012-08-17 10:40 ` Dan Carpenter
2012-08-17 10:41 ` Jonathan Cameron
2012-08-17 12:07 ` Peter Meerwald
2013-01-29 14:59 ` [PATCH] iio: gyro: Add itg3200 Manuel Stahl
2013-01-30 15:22   ` Lars-Peter Clausen
2013-01-31 11:54     ` Manuel Stahl
2013-01-31 12:12       ` Lars-Peter Clausen
2013-01-31 12:17       ` [PATCH V3] " Manuel Stahl
2013-01-31 15:21         ` Lars-Peter Clausen
2013-01-31 18:37           ` Manuel Stahl [this message]
2013-01-31 19:14             ` Lars-Peter Clausen
2013-02-01  8:51               ` [PATCH V4] " Manuel Stahl
2013-02-01 10:07                 ` Lars-Peter Clausen
2013-02-02  9:34                   ` Jonathan Cameron
2013-01-31  9:36   ` [PATCH] " Lars-Peter Clausen

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=201301311937.10124.manuel.stahl@iis.fraunhofer.de \
    --to=manuel.stahl@iis.fraunhofer.de \
    --cc=jic23@cam.ac.uk \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=thorsten.nowak@iis.fraunhofer.de \
    /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).