public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Jonathan McDowell <noodles@earth.li>,
	Takashi Iwai <tiwai@suse.de>,
	Peter Ujfalusi <peter.ujfalusi@nokia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	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 16:55:36 +0200	[thread overview]
Message-ID: <4A672868.6040502@tis.icnet.pl> (raw)
In-Reply-To: <20090722121925.GE21171@rakim.wolfsonmicro.main>

Mark Brown wrote:
> 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.

Thanks, I'll rewrite as you suggest.

Janusz

  reply	other threads:[~2009-07-22 14:55 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
2009-07-22 14:55       ` Janusz Krzysztofik [this message]
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=4A672868.6040502@tis.icnet.pl \
    --to=jkrzyszt@tis.icnet.pl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=arunks@mistralsolutions.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=e3-hacking@earth.li \
    --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