android_kernel_xiaomi_sm8350/drivers/video
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
..
aty tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
backlight tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
console Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
display tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
geode cs5535: define lxfb/gxfb MSRs in linux/cs5535.h 2009-12-15 08:53:28 -08:00
i810
intelfb
kyro
logo
matrox
mb862xx
mbx
msm drivers/video/msm: update to new kernel 2009-11-12 07:26:00 -08:00
nvidia
omap mfd: Rename all twl4030_i2c* 2009-12-13 21:23:33 +01:00
omap2 OMAP: DSS2: Taal DSI command mode panel driver 2009-12-09 18:21:41 +02:00
pnx4008
riva
savage savagefb: fix blanking mode on CRT display 2009-11-12 07:25:56 -08:00
sis
vermilion
via tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
68328fb.c
acornfb.c
acornfb.h
amba-clcd.c
amifb.c
arcfb.c
arkfb.c
asiliantfb.c
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c fbdev: atafb - add palette register check 2009-12-06 11:18:27 +01:00
atafb.h
atmel_lcdfb.c Merge branch 'for-next' into for-linus 2009-12-07 18:36:35 +01:00
au1100fb.c
au1100fb.h
au1200fb.c
au1200fb.h
bf54x-lq043fb.c
bfin-t350mcqb-fb.c
broadsheetfb.c fb-defio: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers. 2009-12-03 17:30:42 -08:00
bt431.h
bt455.h
bw2.c
c2p_core.h
c2p_iplan2.c
c2p_planar.c
c2p.h
carminefb_regs.h
carminefb.c
carminefb.h
cfbcopyarea.c
cfbfillrect.c
cfbimgblt.c
cg3.c
cg6.c
cg14.c
chipsfb.c
cirrusfb.c
clps711xfb.c
cobalt_lcdfb.c
controlfb.c
controlfb.h
cyber2000fb.c
cyber2000fb.h
da8xx-fb.c davinci: fb: fix frame buffer driver issues 2009-12-01 16:32:19 -08:00
dnfb.c
edid.h
efifb.c
ep93xx-fb.c
epson1355fb.c
fb_ddc.c
fb_defio.c Merge branch 'xen/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen 2009-12-10 09:34:40 -08:00
fb_draw.h
fb_notify.c
fb_sys_fops.c
fbcmap.c
fbcvt.c
fbmem.c
fbmon.c
fbsysfs.c
ffb.c
fm2fb.c
fsl-diu-fb.c
fsl-diu-fb.h
g364fb.c
gbefb.c Merge branch 'for-next' into for-linus 2009-12-07 18:36:35 +01:00
gxt4500.c
hecubafb.c fb-defio: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers. 2009-12-03 17:30:42 -08:00
hgafb.c
hitfb.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
hpfb.c
igafb.c
imsttfb.c
imxfb.c
Kconfig Merge branch 'for-linus' of git://codeaurora.org/quic/kernel/dwalker/linux-msm 2009-12-11 20:46:51 -08:00
leo.c
macfb.c
macmodes.c
macmodes.h
Makefile OMAP: Add VRAM manager 2009-12-09 12:04:33 +02:00
maxinefb.c
metronomefb.c fb-defio: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers. 2009-12-03 17:30:42 -08:00
modedb.c
mx3fb.c
n411.c
neofb.c
offb.c offb: Add support for framebuffer handoff to offb. 2009-12-09 17:09:29 +11:00
output.c tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
p9100.c
platinumfb.c
platinumfb.h
pm2fb.c
pm3fb.c
pmag-aa-fb.c
pmag-ba-fb.c
pmagb-b-fb.c
ps3fb.c
pvr2fb.c
pxa168fb.c pxa168fb: fix offset setting at initialization 2009-12-01 09:02:31 +08:00
pxa168fb.h
pxafb.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
pxafb.h
q40fb.c
s1d13xxxfb.c
s3c2410fb.c
s3c2410fb.h
s3c-fb.c
s3fb.c
sa1100fb.c
sa1100fb.h
sbuslib.c
sbuslib.h
sgivwfb.c sgivwfb: Make use of ARRAY_SIZE. 2009-12-04 15:39:52 +01:00
sh7760fb.c
sh_mobile_lcdcfb.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
skeletonfb.c
sm501fb.c
sstfb.c
sticore.h
stifb.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
sunxvr500.c
sunxvr2500.c
svgalib.c
syscopyarea.c
sysfillrect.c
sysimgblt.c
tcx.c
tdfxfb.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
tgafb.c
tmiofb.c
tridentfb.c
uvesafb.c fb: remove fb_save_state() and fb_restore_state operations 2009-11-12 07:25:56 -08:00
valkyriefb.c
valkyriefb.h
vesafb.c
vfb.c
vga16fb.c
vgastate.c
vt8623fb.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
w100fb.c
w100fb.h
xen-fbfront.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-12-11 12:18:16 -08:00
xilinxfb.c