From: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Takashi Iwai <tiwai@suse.de>,
alsa-devel@alsa-project.org, Liam@alsa-project.org,
Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 4/4] ASoC: clean up cache accesser
Date: Mon, 20 Dec 2010 17:09:00 +0000 [thread overview]
Message-ID: <1292864940.29185.19.camel@dplaptop.localdomain> (raw)
In-Reply-To: <20101220165421.GE14986@sirena.org.uk>
On Mon, 2010-12-20 at 16:54 +0000, Mark Brown wrote:
> On Mon, Dec 20, 2010 at 05:47:13PM +0100, Takashi Iwai wrote:
>
> > Yes, this would be safer. I didn't put it since I wasn't sure whether
> > BUG() content is also expanded at each caller. If yes, it would
> > bloat. (Alternatively we may use snd_BUG_ON() -- it's built in only
> > when CONFIG_SND_DEBUG is set.)
>
> That's entirely up to the compiler - inline is purely advice and may
> well be completely ignored by the compile (and of course functions that
> aren't marked inline may be inlined if it decides that's useful).
One way to enforce the expansion of inline functions on gcc is to use
__attribute__ ((always_inline)). Generally it is best left up to the
compiler to perform the inling if it so deems necessary.
> One reason for making it a BUG() is that if we get far enough for the
> check to go off when doing actual register lookups we've hit a definite
> bug in the code.
By performing the check at *_init, it will be impossible for the code to
ever reach any of the read()/write() functions if an unsupported word
size has been passed in. The downside is that we depend on the
implementers of the *_init functions to perform this check.
Thanks,
Dimitrios
next prev parent reply other threads:[~2010-12-20 17:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 14:50 ASoC cache code (looking toward 2.6.38 merge window) Takashi Iwai
2010-12-20 15:27 ` Mark Brown
2010-12-20 15:56 ` Takashi Iwai
2010-12-20 16:01 ` [PATCH 1/4] ASoC: clean up cache read/write functions Takashi Iwai
2010-12-20 16:01 ` [PATCH 2/4] ASoC: clean up spi " Takashi Iwai
2010-12-20 16:02 ` [PATCH 3/4] ASoC: clean up i2c cache read / write functions Takashi Iwai
2010-12-20 16:05 ` [PATCH 4/4] ASoC: clean up cache accesser Takashi Iwai
2010-12-20 16:27 ` Dimitris Papastamos
2010-12-20 16:47 ` Takashi Iwai
2010-12-20 16:54 ` Mark Brown
2010-12-20 17:09 ` Dimitris Papastamos [this message]
2010-12-20 17:22 ` Takashi Iwai
2010-12-20 17:04 ` Dimitris Papastamos
2010-12-20 16:42 ` Mark Brown
2010-12-20 16:57 ` Takashi Iwai
2010-12-20 17:20 ` [PATCH 4/4] ASoC: Factor out cache_ops implementations Takashi Iwai
2010-12-20 17:29 ` [PATCH 2/4] ASoC: clean up spi cache read/write functions Mark Brown
2010-12-20 17:23 ` [PATCH 1/4] ASoC: clean up " Dimitris Papastamos
2010-12-20 17:24 ` Mark Brown
2010-12-20 17:32 ` Takashi Iwai
2010-12-20 16:34 ` ASoC cache code (looking toward 2.6.38 merge window) Mark Brown
2010-12-20 16:51 ` Takashi Iwai
2010-12-20 16:58 ` Mark Brown
2010-12-20 16:59 ` Takashi Iwai
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=1292864940.29185.19.camel@dplaptop.localdomain \
--to=dp@opensource.wolfsonmicro.com \
--cc=Liam@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.