From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>,
Stephen Warren <swarren@nvidia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: fix SPI_BIT_MASK() to use correct size for 32-bit transfer mask
Date: Wed, 21 Aug 2013 10:44:57 +0300 [thread overview]
Message-ID: <20130821074457.GB4898@intel.com> (raw)
In-Reply-To: <52139B4E.6070700@wwwdotorg.org>
On Tue, Aug 20, 2013 at 10:37:34AM -0600, Stephen Warren wrote:
> On 08/20/2013 06:15 AM, Mika Westerberg wrote:
> > When building a 64-bit kernel we get the following warning from the
> > compiler:
> >
> > drivers/spi/spi-pxa2xx.c: In function ‘pxa2xx_spi_probe’:
> > drivers/spi/spi-pxa2xx.c:1152:3: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> > master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
> > ^
> > This is due the fact that when the max range is specified as 32
> > SPI_BIT_MASK() expands to ~0UL which doesn't fit to the u32 type that the
> > master->bits_per_word_mask is.
> >
> > Fix this by using ~0U instead.
>
> The same patch is already in next-20130819 at least, as:
> b6aa23c spi: fix SPI_BIT_MASK so it always fits into 32-bits
Cool :) Thanks for letting me know.
prev parent reply other threads:[~2013-08-21 7:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 12:15 [PATCH] spi: fix SPI_BIT_MASK() to use correct size for 32-bit transfer mask Mika Westerberg
2013-08-20 16:37 ` Stephen Warren
2013-08-21 7:44 ` Mika Westerberg [this message]
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=20130821074457.GB4898@intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.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