From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Brian Lilly <brian@crystalfontz.com>,
Grant Likely <grant.likely@secretlab.ca>,
spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH] spi: spi-gpio: fix compilation warning on 64 bits systems
Date: Thu, 31 Jan 2013 11:12:56 +0100 [thread overview]
Message-ID: <1359627176-22706-1-git-send-email-maxime.ripard@free-electrons.com> (raw)
SPI_GPIO_NO_MOSI and SPI_GPIO_NO_MISO flags are type casted to unsigned
long, yet, they are to be stored in an unsigned int field in the
spi_gpio_platform_data structure.
This leads to the following warning during compilation on 64 bits systems:
warning: large integer implicitly truncated to unsigned type [-Woverflow]
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
---
include/linux/spi/spi_gpio.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/spi/spi_gpio.h b/include/linux/spi/spi_gpio.h
index 369b3d7..1634ce3 100644
--- a/include/linux/spi/spi_gpio.h
+++ b/include/linux/spi/spi_gpio.h
@@ -62,8 +62,8 @@
*/
struct spi_gpio_platform_data {
unsigned sck;
- unsigned mosi;
- unsigned miso;
+ unsigned long mosi;
+ unsigned long miso;
u16 num_chipselect;
};
--
1.7.10.4
next reply other threads:[~2013-01-31 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-31 10:12 Maxime Ripard [this message]
2013-01-31 10:26 ` Mark Brown
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=1359627176-22706-1-git-send-email-maxime.ripard@free-electrons.com \
--to=maxime.ripard@free-electrons.com \
--cc=brian@crystalfontz.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.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
all inboxes | Powered by JetHome®