linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Teodora Baluta <teodora.baluta@intel.com>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 3/5] staging: iio: hmc5843_core: fix sparse warnings
Date: Sat, 02 Aug 2014 17:33:29 +0100	[thread overview]
Message-ID: <53DD12D9.8030000@kernel.org> (raw)
In-Reply-To: <1406546313-23031-4-git-send-email-teodora.baluta@intel.com>

On 28/07/14 12:18, Teodora Baluta wrote:
> Fix the following sparse warnings:
> 
>  CHECK   drivers/staging/iio/magnetometer/hmc5843_core.c
> drivers/staging/iio/magnetometer/hmc5843_core.c:138:70: warning:
> incorrect type in argument 3 (different signedness)
> drivers/staging/iio/magnetometer/hmc5843_core.c:138:70:    expected
> unsigned int *val
> drivers/staging/iio/magnetometer/hmc5843_core.c:138:70:    got int
> *<noident>
> drivers/staging/iio/magnetometer/hmc5843_core.c:215:64: warning:
> incorrect type in argument 3 (different signedness)
> drivers/staging/iio/magnetometer/hmc5843_core.c:215:64:    expected
> unsigned int *val
> drivers/staging/iio/magnetometer/hmc5843_core.c:215:64:    got int
> *<noident>
> drivers/staging/iio/magnetometer/hmc5843_core.c:354:72: warning:
> incorrect type in argument 3 (different signedness)
> drivers/staging/iio/magnetometer/hmc5843_core.c:354:72:    expected
> unsigned int *val
> drivers/staging/iio/magnetometer/hmc5843_core.c:354:72:    got int
> *<noident>
> drivers/staging/iio/magnetometer/hmc5843_core.c:362:72: warning:
> incorrect type in argument 3 (different signedness)
> drivers/staging/iio/magnetometer/hmc5843_core.c:362:72:    expected
> unsigned int *val
> drivers/staging/iio/magnetometer/hmc5843_core.c:362:72:    got int
> *<noident>
> 
> Signed-off-by: Teodora Baluta <teodora.baluta@intel.com>
Applied to the togreg branch of iio.git.

Thanks,

Jonathan
> ---
>  drivers/staging/iio/magnetometer/hmc5843_core.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/staging/iio/magnetometer/hmc5843_core.c
> index 914ae1a..fd171d8 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843_core.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843_core.c
> @@ -131,7 +131,7 @@ static s32 hmc5843_set_mode(struct hmc5843_data *data, u8 operating_mode)
>  static int hmc5843_wait_measurement(struct hmc5843_data *data)
>  {
>  	int tries = 150;
> -	int val;
> +	unsigned int val;
>  	int ret;
>  
>  	while (tries-- > 0) {
> @@ -209,7 +209,7 @@ static ssize_t hmc5843_show_measurement_configuration(struct device *dev,
>  						char *buf)
>  {
>  	struct hmc5843_data *data = iio_priv(dev_to_iio_dev(dev));
> -	int val;
> +	unsigned int val;
>  	int ret;
>  
>  	ret = regmap_read(data->regmap, HMC5843_CONFIG_REG_A, &val);
> @@ -344,7 +344,7 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev,
>  			    int *val, int *val2, long mask)
>  {
>  	struct hmc5843_data *data = iio_priv(indio_dev);
> -	int rval;
> +	unsigned int rval;
>  	int ret;
>  
>  	switch (mask) {
> 

  reply	other threads:[~2014-08-02 16:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 11:18 [PATCH 0/5] staging: iio: minor fixes for sparse warnings Teodora Baluta
2014-07-28 11:18 ` [PATCH 1/5] staging: iio: ad7816: fix sparse warning cast to restricted __be16 Teodora Baluta
2014-08-02 11:56   ` Jonathan Cameron
2014-07-28 11:18 ` [PATCH 2/5] staging: iio: ad5933: " Teodora Baluta
2014-08-02 11:57   ` Jonathan Cameron
2014-07-28 11:18 ` [PATCH 3/5] staging: iio: hmc5843_core: fix sparse warnings Teodora Baluta
2014-08-02 16:33   ` Jonathan Cameron [this message]
2014-07-28 11:18 ` [PATCH 4/5] staging: iio: isl29018: fix sparse warning regarding incorrect type (different signedness) Teodora Baluta
2014-08-02 16:35   ` Jonathan Cameron
2014-07-28 11:18 ` [PATCH 5/5] staging: iio: adis16240: fix sparse warnings regarding incorrect argument type Teodora Baluta
2014-08-02 16:44   ` 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=53DD12D9.8030000@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=teodora.baluta@intel.com \
    /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).