From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
linux-iio@vger.kernel.org, drivers@analog.com
Subject: Re: [PATCH 19/22] staging:iio:ad7192: Use common Sigma Delta library
Date: Mon, 03 Sep 2012 10:13:00 +0200 [thread overview]
Message-ID: <5044668C.5050707@metafoo.de> (raw)
In-Reply-To: <503BA93E.5060205@kernel.org>
On 08/27/2012 07:07 PM, Jonathan Cameron wrote:
> On 08/10/2012 05:36 PM, Lars-Peter Clausen wrote:
>> Convert the ad7192 driver to make use of the new common code for devices from
>> the Analog Devices Sigma Delta family.
>
> Hi Lars-Peter.
>
> Was just applying these to my togreg branch and ran a few build tests with sparse.
> issue in this and ad7793 came up.
>
> drivers/staging/iio/adc/ad7793.c:91:21: warning: incorrect type in initializer (incompatible argument 2 (different
> signedness))
> drivers/staging/iio/adc/ad7793.c:91:21: expected int ( *set_mode )( ... )
> drivers/staging/iio/adc/ad7793.c:91:21: got int ( static [toplevel] *<noident> )( ... )
>
>
> Now this is because set_mode takes and integer argument here, but is defined to
> take an enum.
>
> Why not just take the enum directly?
>
> I'm guessing this is a left over from a cleanup that didn't
> quite get everywhere. Will convert them over to the enum argument before
> pushing them out, but would like you to take a quick glance at them...
>
> Change given inline below.
>>
>>[...]
>>
>> -static int ad7192_read_reg(struct ad7192_state *st,
>> - unsigned reg, int *val, unsigned size)
> Change is here,
>
> static int ad7793_set_mode(struct ad_sigma_delta *sd,
> enum ad_sigma_delta_mode mode)
Yes, looks good, except for the part number ;) Both patch 18 (ad7793) and 19
(ad7192) have the same issue.
Thanks.
>
>> +static int ad7192_set_mode(struct ad_sigma_delta *sd, unsigned int mode)
>> {
>> - return __ad7192_read_reg(st, 0, 0, reg, val, size);
>> -}
next prev parent reply other threads:[~2012-09-03 8:13 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-10 16:36 [PATCH 01/22] staging:iio:ad7793: Add missing break in switch statement Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 02/22] staging:iio:ad7793: Mark channels as unsigned Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 03/22] staging:iio:ad7793: Report channel offset Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 04/22] staging:iio:ad7793: Fix temperature scale and offset Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 05/22] staging:iio:ad7793: Follow new IIO naming spec Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 06/22] staging:iio:ad7793: Fix internal reference value Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 07/22] staging:iio:ad7793: Remove unused platform_data from device state struct Lars-Peter Clausen
2012-08-14 19:39 ` Jonathan Cameron
2012-08-14 20:19 ` Jonathan Cameron
2012-08-15 9:03 ` Lars-Peter Clausen
2012-08-15 9:28 ` Jonathan Cameron
[not found] ` <502B6688.6000904@metafoo.de>
2012-09-03 16:39 ` Lars-Peter Clausen
2012-09-03 20:09 ` Jonathan Cameron
2012-08-10 16:36 ` [PATCH 08/22] staging:iio:ad7192: Add missing break in switch statement Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 09/22] staging:iio:ad7192: Fix setting ACX Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 10/22] staging:iio:ad7192: Mark channels as unsigned Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 11/22] staging:iio:ad7192: Report channel offset Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 12/22] staging:iio:ad7192: Report offset and scale for temperature channel Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 13/22] staging:iio:ad7192: Remove unused platform_data from device state struct Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 14/22] staging:iio:ad7780: Mark channels as unsigned Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 15/22] iio: Introduce iio_device_{set,get}_drvdata() Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 16/22] iio:adc: Add common code for ADI Sigma Delta devices Lars-Peter Clausen
2012-08-14 12:03 ` Jonathan Cameron
2012-08-14 20:19 ` Jonathan Cameron
2012-08-10 16:36 ` [PATCH 17/22] staging:iio:ad7780: Use common Sigma Delta library Lars-Peter Clausen
2012-08-14 12:05 ` Jonathan Cameron
2012-08-10 16:36 ` [PATCH 18/22] staging:iio:ad7793: " Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 19/22] staging:iio:ad7192: " Lars-Peter Clausen
2012-08-27 17:07 ` Jonathan Cameron
2012-09-03 8:13 ` Lars-Peter Clausen [this message]
2012-08-10 16:36 ` [PATCH 20/22] staging:iio:ad7793: Add support for ad7794/ad7795 Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 21/22] staging:iio:ad7793: Add ad7785 support Lars-Peter Clausen
2012-08-10 16:36 ` [PATCH 22/22] staging:iio:adc: Add AD7791 driver Lars-Peter Clausen
2012-08-11 8:41 ` Peter Meerwald
2012-08-11 17:37 ` Lars-Peter Clausen
2012-08-13 13:12 ` Lars-Peter Clausen
2012-08-14 20:18 ` Jonathan Cameron
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=5044668C.5050707@metafoo.de \
--to=lars@metafoo.de \
--cc=drivers@analog.com \
--cc=jic23@cam.ac.uk \
--cc=jic23@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).