staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros
authorJoe Perches <joe@perches.com>
Wed, 25 Mar 2015 19:54:25 +0000 (12:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 12:16:19 +0000 (13:16 +0100)
commit031366ea65495f787eb792a135f51c093d75a197
tree21b523d33f37b7d66cfcf798cb3ba43be8e1cc61
parentda3c8deef6b392cfe9d19645de2fec9fc2005522
staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros

Remove these flow hiding macros.

Miscellanea:

o Add a macro and function to replace a large inline
o Simplify #includes
o Add trace.c and update Makefile
o Remove static inline filename function and use kbasename instead

This reduces object size quite a lot: ~350KB (x86-64 allyesconfig)

$ size drivers/staging/rts5208/built-in.o*
   text    data     bss     dec     hex filename
 248385   36728   77888  363001   589f9 drivers/staging/rts5208/built-in.o.new
 506691   83352  115896  705939   ac593 drivers/staging/rts5208/built-in.o.old

Done via coccinelle script and some typing.

@@
expression chip;
expression ret;
@@

- TRACE_RET(chip, ret);
+ rtsx_trace(chip);
+ return ret;

@@
expression chip;
identifier label;
@@

- TRACE_GOTO(chip, label);
+ rtsx_trace(chip);
+ goto label;

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 files changed:
drivers/staging/rts5208/Makefile
drivers/staging/rts5208/ms.c
drivers/staging/rts5208/rtsx.c
drivers/staging/rts5208/rtsx.h
drivers/staging/rts5208/rtsx_card.c
drivers/staging/rts5208/rtsx_chip.c
drivers/staging/rts5208/rtsx_chip.h
drivers/staging/rts5208/rtsx_scsi.c
drivers/staging/rts5208/rtsx_transport.c
drivers/staging/rts5208/sd.c
drivers/staging/rts5208/spi.c
drivers/staging/rts5208/trace.c [new file with mode: 0644]
drivers/staging/rts5208/trace.h
drivers/staging/rts5208/xd.c