From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>,
uclinux-dist-devel@blackfin.uclinux.org,
alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] ASoC: Ensure we generate a driver name
Date: Wed, 21 Sep 2011 13:41:21 +0100 [thread overview]
Message-ID: <20110921124120.GE4374@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CAHG8p1C28+d5NeyxQ0zCPAqgQ5ZtBNej+Az3PTnNFr==o9Ls=A@mail.gmail.com>
On Wed, Sep 21, 2011 at 01:09:30PM +0800, Scott Jiang wrote:
> 2011/9/20 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> > + for (i = 0; i < ARRAY_SIZE(card->snd_card->driver); i++) {
> > + switch (card->snd_card->driver[i]) {
> > + case '_':
> > + case '-':
> > + case '\0':
> > + break;
> > + default:
> > + if (!isalnum(card->snd_card->driver[i]))
> > + card->snd_card->driver[i] = '_';
> > + break;
> > + }
> > + }
> If '\0', we should break out of loop?
It's really not worth the code complexity, we only run this once during
probe and the array is fixed size and small.
next prev parent reply other threads:[~2011-09-21 12:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 13:16 [PATCH] ASoC: Ensure we generate a driver name Mark Brown
2011-09-21 5:09 ` Scott Jiang
2011-09-21 12:41 ` Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-09-20 12:58 Mark Brown
2011-09-20 13:11 ` Takashi Iwai
2011-09-20 13:18 ` Mark Brown
2011-09-20 13:32 ` Takashi Iwai
2011-09-20 13:52 ` Mark Brown
2011-09-20 14:02 ` 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=20110921124120.GE4374@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@ti.com \
--cc=patches@opensource.wolfsonmicro.com \
--cc=scott.jiang.linux@gmail.com \
--cc=tiwai@suse.de \
--cc=uclinux-dist-devel@blackfin.uclinux.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 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.