From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] regmap: spi: Support asynchronous I/O for SPI
Date: Tue, 29 Jan 2013 09:54:15 +0800 [thread overview]
Message-ID: <20130129015411.GD4748@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <51072A38.6090505@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
On Mon, Jan 28, 2013 at 05:47:36PM -0800, Stephen Boyd wrote:
> On 01/28/13 17:39, Mark Brown wrote:
> > We could but I tend not to if the interface strictly requires that the
> > pointers be type punnable.
> What is the interface requiring strict type punning here? async_write?
Yes, the async data must always be the first member of the bus specific
struct. This is to avoid having to do an additional allocation for the
bus specific private data.
> I just hope we don't move the fields around in the regmap_async_spi
> struct and then this code silently breaks. I hope the compiler is smart
> enough to skip doing any math if we used container_of() with the current
> struct layout.
It would break anyway, like I say the interface relies on it currently.
The other option is to do a callback into the bus code and return the
contained structure but it seemed more involved and this is fairly
idiomatic.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-01-29 1:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-27 14:12 [PATCH 1/2] regmap: Add asynchronous I/O support Mark Brown
2013-01-27 14:12 ` [PATCH 2/2] regmap: spi: Support asynchronous I/O for SPI Mark Brown
2013-01-28 19:38 ` Stephen Boyd
2013-01-29 1:39 ` Mark Brown
2013-01-29 1:47 ` Stephen Boyd
2013-01-29 1:54 ` Mark Brown [this message]
2013-01-29 3:58 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2013-01-29 4:31 [PATCH 1/2] regmap: Add asynchronous I/O support Mark Brown
2013-01-29 4:31 ` [PATCH 2/2] regmap: spi: Support asynchronous I/O for SPI 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=20130129015411.GD4748@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@codeaurora.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;
as well as URLs for NNTP newsgroup(s).