public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Jonathan McDowell <noodles@earth.li>,
	Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
	Tony Lindgren <tony@atomide.com>,
	Peter Ujfalusi <peter.ujfalusi@nokia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	e3-hacking@earth.li, Arun KS <arunks@mistralsolutions.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [RFC] [PATCH 3/3] ASoC: add support for Amstrad E3 (Delta) machine
Date: Wed, 22 Jul 2009 13:19:26 +0100	[thread overview]
Message-ID: <20090722121925.GE21171@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <s5hhbx50wwl.wl%tiwai@suse.de>

On Wed, Jul 22, 2009 at 01:39:22PM +0200, Takashi Iwai wrote:
> Mark Brown wrote:

> > > +	/* Setup pins after corresponding bits if changed */
> > > +	if ((bool)snd_soc_dapm_get_pin_status(codec, "Speaker") !=
> > > +			(bool)(function & (1 << AMS_DELTA_SPEAKER))) {

> > Don't like these casts...  why are they needed?

> Because the right side is the bit operation?

Ick, yes.

> The cast doesn't look nice, though...

Indeed.  I'd suggest rewriting to try to do less in the if statement - a
helper function seems to be in order here since the same code is
repeated several times with different pins and bitmasks.

  reply	other threads:[~2009-07-22 12:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22  3:22 [RFC] [PATCH 3/3] ASoC: add support for Amstrad E3 (Delta) machine Janusz Krzysztofik
2009-07-22 11:03 ` Mark Brown
2009-07-22 11:39   ` [alsa-devel] " Takashi Iwai
2009-07-22 12:19     ` Mark Brown [this message]
2009-07-22 14:55       ` Janusz Krzysztofik
2009-07-22 14:53   ` Janusz Krzysztofik
2009-07-22 15:07     ` Mark Brown
2009-07-22 19:18       ` Janusz Krzysztofik
2009-07-23  8:57         ` [alsa-devel] " 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=20090722121925.GE21171@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=arunks@mistralsolutions.com \
    --cc=e3-hacking@earth.li \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=noodles@earth.li \
    --cc=peter.ujfalusi@nokia.com \
    --cc=tiwai@suse.de \
    --cc=tony@atomide.com \
    /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