From: thierry.reding@gmail•com (Thierry Reding)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCHv7 1/4] pwm: Add Freescale FTM PWM driver support
Date: Tue, 17 Dec 2013 14:22:48 +0100 [thread overview]
Message-ID: <20131217132247.GB2329@ulmo.nvidia.com> (raw)
In-Reply-To: <20131217130435.GV4360@n2100.arm.linux.org.uk>
On Tue, Dec 17, 2013 at 01:04:35PM +0000, Russell King - ARM Linux wrote:
> 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.
If sparse doesn't complain about the original code here, does that mean
we have a bug that should be fixed?
> 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.
A few years ago GregKH commented in response to a patch that ioread*()
weren't supposed to be used for memory-mapped only devices. The original
purpose apparently was to allow drivers to work with both I/O and
memory-mapped devices.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131217/f4f9097f/attachment.sig>
next prev parent reply other threads:[~2013-12-17 13:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 8:57 [PATCHv7 0/4] Add Freescale FTM PWM driver Xiubo Li
2013-12-13 8:57 ` [PATCHv7 1/4] pwm: Add Freescale FTM PWM driver support Xiubo Li
2013-12-17 11:10 ` Thierry Reding
2013-12-17 11:51 ` Russell King - ARM Linux
2013-12-17 12:00 ` Tomasz Figa
2013-12-17 12:45 ` Thierry Reding
2013-12-17 12:54 ` Tomasz Figa
2013-12-17 13:04 ` Russell King - ARM Linux
2013-12-17 13:08 ` Tomasz Figa
2013-12-17 13:22 ` Thierry Reding [this message]
2013-12-18 9:43 ` Li.Xiubo at freescale.com
2013-12-18 6:28 ` Li.Xiubo at freescale.com
2013-12-17 12:24 ` Thierry Reding
2013-12-17 12:58 ` Russell King - ARM Linux
2013-12-17 13:19 ` Thierry Reding
2013-12-18 3:34 ` Li.Xiubo at freescale.com
2013-12-13 8:57 ` [PATCHv7 2/4] ARM: dts: Add Freescale FTM PWM node for VF610 Xiubo Li
2013-12-13 8:57 ` [PATCHv7 3/4] ARM: dts: Enables FTM PWM device for Vybrid VF610 TOWER board Xiubo Li
2013-12-13 8:57 ` [PATCHv7 4/4] Documentation: Add device tree bindings for Freescale FTM PWM Xiubo Li
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=20131217132247.GB2329@ulmo.nvidia.com \
--to=thierry.reding@gmail$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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