[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130821074457.GB4898@intel.com>
Date: Wed, 21 Aug 2013 10:44:57 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Stephen Warren <swarren@...dotorg.org>
Cc: linux-spi@...r.kernel.org, Mark Brown <broonie@...nel.org>,
Stephen Warren <swarren@...dia.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: fix SPI_BIT_MASK() to use correct size for 32-bit
transfer mask
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists