linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlad Dogaru <vlad.dogaru@intel.com>
To: linux-iio@vger.kernel.org
Cc: Vlad Dogaru <vlad.dogaru@intel.com>
Subject: [PATCH] iio: mma9551: fix sparse warning
Date: Mon, 15 Dec 2014 17:16:51 +0200	[thread overview]
Message-ID: <1418656611-13496-1-git-send-email-vlad.dogaru@intel.com> (raw)

sparse warnings: (new ones prefixed by >>)

>> drivers/iio/accel/mma9551.c:554:57: sparse: mixing different enum types
   drivers/iio/accel/mma9551.c:554:57:     int enum mma9551_tilt_axis  versus
   drivers/iio/accel/mma9551.c:554:57:     int enum mma9551_gpio_pin
>> drivers/iio/accel/mma9551.c:576:57: sparse: mixing different enum types
   drivers/iio/accel/mma9551.c:576:57:     int enum mma9551_tilt_axis  versus
   drivers/iio/accel/mma9551.c:576:57:     int enum mma9551_gpio_pin

Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
---
 drivers/iio/accel/mma9551.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c
index 1be125b..6563e26 100644
--- a/drivers/iio/accel/mma9551.c
+++ b/drivers/iio/accel/mma9551.c
@@ -551,7 +551,8 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
 		return 0;
 
 	if (state == 0) {
-		ret = mma9551_gpio_config(data->client, mma_axis,
+		ret = mma9551_gpio_config(data->client,
+					  (enum mma9551_gpio_pin)mma_axis,
 					  MMA9551_APPID_NONE, 0, 0);
 		if (ret < 0)
 			return ret;
@@ -573,7 +574,8 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev,
 			return -EINVAL;
 		}
 
-		ret = mma9551_gpio_config(data->client, mma_axis,
+		ret = mma9551_gpio_config(data->client,
+					  (enum mma9551_gpio_pin)mma_axis,
 					  MMA9551_APPID_TILT, bitnum, 0);
 		if (ret < 0)
 			return ret;
-- 
1.9.1


             reply	other threads:[~2014-12-15 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 15:16 Vlad Dogaru [this message]
2014-12-15 16:30 ` [PATCH] iio: mma9551: fix sparse warning Tirdea, Irina
2014-12-26 12:14   ` 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=1418656611-13496-1-git-send-email-vlad.dogaru@intel.com \
    --to=vlad.dogaru@intel.com \
    --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).