[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131217130435.GV4360@n2100.arm.linux.org.uk>
Date: Tue, 17 Dec 2013 13:04:35 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Tomasz Figa <tomasz.figa@...il.com>
Cc: Thierry Reding <thierry.reding@...il.com>,
Xiubo Li <Li.Xiubo@...escale.com>, mark.rutland@....com,
s.hauer@...gutronix.de, galak@...eaurora.org,
swarren@...dotorg.org, t.figa@...sung.com, grant.likely@...aro.org,
matt.porter@...aro.org, rob@...dley.net, ian.campbell@...rix.com,
pawel.moll@....com, rob.herring@...xeda.com,
linux-arm-kernel@...ts.infradead.org, linux-pwm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-doc@...r.kernel.org, Alison Wang <b18965@...escale.com>,
Jingchang Lu <b35083@...escale.com>
Subject: Re: [PATCHv7 1/4] pwm: Add Freescale FTM PWM driver support
On Tue, Dec 17, 2013 at 01:54:35PM +0100, Tomasz Figa wrote:
> On Tuesday 17 of December 2013 13:45:06 Thierry Reding wrote:
> > I fail to see how that would eliminate the problem with the types. That
> > said I don't actually see sparse complaining about any type mismatches.
> > That's probably because the various macros implicitly cast to u32.
>
> Well, in BE variant you would read the register using __raw_readl() into
> a __be32 and then get an u32 from be32_to_cpu() and return it. Similarly
> for writes
__raw_readl() returns a u32, so you'll get a warning trying to assign a
u32 to a __be32.
We do have ioread32() and ioread32be() which do the appropriate conversion,
as well as the write versions too. They both include the barrier if you're
overly concerned about that.
--
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