From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Jonathan Cameron <jic23@kernel.org>,
Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit
Date: Wed, 4 Oct 2017 14:08:24 +0200 [thread overview]
Message-ID: <1507118906-8946-2-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1507118906-8946-1-git-send-email-geert+renesas@glider.be>
On 64-bit:
drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_parse_subdevs':
drivers/iio/adc/rcar-gyroadc.c:352:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
childmode = (unsigned int)of_id->data;
^
Cast the pointer to uintptr_t instead of unsigned int to fix this.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Currently this driver can be enabled on arm32 only, but the hardware
block can be found in some R-Car Gen3 SoCs, which are arm64.
---
drivers/iio/adc/rcar-gyroadc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
index 2cb5397ceeea9ff4..0098c66a19572400 100644
--- a/drivers/iio/adc/rcar-gyroadc.c
+++ b/drivers/iio/adc/rcar-gyroadc.c
@@ -348,7 +348,7 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev)
continue;
}
- childmode = (unsigned int)of_id->data;
+ childmode = (uintptr_t)of_id->data;
switch (childmode) {
case RCAR_GYROADC_MODE_SELECT_1_MB88101A:
sample_width = 12;
--
2.7.4
next prev parent reply other threads:[~2017-10-04 12:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 12:08 [PATCH 0/3] iio: adc: rcar-gyroadc: Misc improvements Geert Uytterhoeven
2017-10-04 12:08 ` Geert Uytterhoeven [this message]
2017-10-05 9:11 ` [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit Simon Horman
2017-10-07 11:17 ` Jonathan Cameron
2017-10-04 12:08 ` [PATCH 2/3] iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM Geert Uytterhoeven
2017-10-05 9:12 ` Simon Horman
2017-10-07 11:19 ` Jonathan Cameron
2017-10-04 12:08 ` [PATCH 3/3] iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper Geert Uytterhoeven
2017-10-05 9:12 ` Simon Horman
2017-10-07 11:20 ` 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=1507118906-8946-2-git-send-email-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=pmeerw@pmeerw.net \
/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).