linux/sound/pci
André Goddard Rosa e7d2860b69 tree-wide: convert open calls to remove spaces to skip_spaces() lib function
Makes use of skip_spaces() defined in lib/string.c for removing leading
spaces from strings all over the tree.

It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
   text    data     bss     dec     hex filename
  64688     584     592   65864   10148 (TOTALS-BEFORE)
  64641     584     592   65817   10119 (TOTALS-AFTER)

Also, while at it, if we see (*str && isspace(*str)), we can be sure to
remove the first condition (*str) as the second one (isspace(*str)) also
evaluates to 0 whenever *str == 0, making it redundant. In other words,
"a char equals zero is never a space".

Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
and found occurrences of this pattern on 3 more files:
    drivers/leds/led-class.c
    drivers/leds/ledtrig-timer.c
    drivers/video/output.c

@@
expression str;
@@

( // ignore skip_spaces cases
while (*str &&  isspace(*str)) { \(str++;\|++str;\) }
|
- *str &&
isspace(*str)
)

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Neil Brown <neilb@suse.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: David Howells <dhowells@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:32 -08:00
..
ac97 ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep" 2009-11-05 09:00:18 +01:00
ali5451 ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests 2009-10-30 12:01:27 +01:00
au88x0 sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
aw2 trivial: typo (en|dis|avail|remove)bale -> (en|dis|avail|remove)able 2009-06-12 18:01:45 +02:00
ca0106 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
cs46xx tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
cs5535audio ALSA: cs5535audio: free OLPC quirks from reliance on MGEODE_LX cpu optimization 2009-12-15 08:53:27 -08:00
ctxfi Merge branch 'fix/misc' into topic/misc 2009-11-01 11:11:07 +01:00
echoaudio ALSA: echoaudio - Re-enable the line-out control for the Mia card 2009-09-30 08:26:45 +02:00
emu10k1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
hda tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
ice1712 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2009-12-09 19:52:13 -08:00
korg1212 ALSA: Add missing SNDRV_PCM_INFO_BATCH flag to some drivers 2009-04-28 15:06:44 +02:00
lx6464es ALSA: lx6464es - remove unused struct member 2009-09-21 15:13:57 +02:00
mixart sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
nm256 sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
oxygen sound: oxygen: fix input monitor control names 2009-09-28 11:55:17 +02:00
pcxhr dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
riptide ALSA: riptide - proper handling of pci_register_driver for joystick 2009-07-15 14:00:40 +02:00
rme9652 tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
trident dma-mapping: replace all DMA_30BIT_MASK macro with DMA_BIT_MASK(30) 2009-04-07 08:31:11 -07:00
vx222 sound: vx222: fix input level control range check 2009-08-24 09:46:08 +02:00
ymfpci sound: ymfpci: increase timer resolution to 96 kHz 2009-08-10 13:14:46 +02:00
ad1889.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
ad1889.h
ak4531_codec.c ALSA: Fix missing KERN_* prefix to printk in sound/pci 2009-02-05 16:11:31 +01:00
als300.c dma-mapping: replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28) 2009-04-07 08:31:12 -07:00
als4000.c dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
atiixp_modem.c sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
atiixp.c sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
azt3328.c ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep" 2009-11-05 09:00:18 +01:00
azt3328.h ALSA: azt3328: fix previous breakage, improve suspend, cleanups 2009-07-15 12:03:26 +02:00
bt87x.c ALSA: bt87x - Add a whitelist for Pinnacle PCTV (11bd:0012) 2009-10-13 09:34:28 +02:00
cmipci.c ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep" 2009-11-05 09:00:18 +01:00
cs4281.c sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
cs5530.c ALSA: Convert to snd_card_create() in sound/pci/* 2009-01-12 15:20:55 +01:00
ens1370.c sound: Use PCI_VDEVICE for CREATIVE and ECTIVA 2009-06-25 08:53:57 +02:00
ens1371.c
es1938.c ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep" 2009-11-05 09:00:18 +01:00
es1968.c dma-mapping: replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28) 2009-04-07 08:31:12 -07:00
fm801.c snd-fm801: autodetect SF64-PCR (tuner-only) card 2009-12-03 18:25:40 +01:00
intel8x0.c ALSA: intel8x0: Mute External Amplifier by default for Gateway 4525GZ 2009-11-25 10:01:20 +01:00
intel8x0m.c sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
Kconfig ALSA: ice1712: Use bitrev8 2009-11-13 08:30:22 +01:00
maestro3.c dma-mapping: replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28) 2009-04-07 08:31:12 -07:00
Makefile Merge branch 'topic/lx6464es' into for-linus 2009-06-10 07:26:34 +02:00
rme32.c sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
rme96.c sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
sis7019.c dma-mapping: replace all DMA_30BIT_MASK macro with DMA_BIT_MASK(30) 2009-04-07 08:31:11 -07:00
sis7019.h trivial: fix typos s/paramter/parameter/ and s/excute/execute/ in documentation and source comments. 2009-06-12 18:01:46 +02:00
sonicvibes.c sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
via82xx_modem.c sound: Use PCI_VDEVICE 2009-06-25 08:52:49 +02:00
via82xx.c sound: via82xx: deactivate DXS controls of inactive streams 2009-10-30 12:39:22 +01:00