mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![Joe Perches](/assets/img/avatar_default.png)
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>
40 lines
1.2 KiB
C
40 lines
1.2 KiB
C
/* Driver for Realtek PCI-Express card reader
|
|
* Header file
|
|
*
|
|
* Copyright(c) 2009-2013 Realtek Semiconductor Corp. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2, or (at your option) any
|
|
* later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Author:
|
|
* Wei WANG (wei_wang@realsil.com.cn)
|
|
* Micky Ching (micky_ching@realsil.com.cn)
|
|
*/
|
|
|
|
#ifndef __REALTEK_RTSX_TRACE_H
|
|
#define __REALTEK_RTSX_TRACE_H
|
|
|
|
struct rtsx_chip;
|
|
|
|
#ifdef _MSG_TRACE
|
|
void _rtsx_trace(struct rtsx_chip *chip, const char *file, const char *func,
|
|
int line);
|
|
#define rtsx_trace(chip) \
|
|
_rtsx_trace(chip, __FILE__, __func__, __LINE__)
|
|
#else
|
|
static inline void rtsx_trace(struct rtsx_chip *chip)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* __REALTEK_RTSX_TRACE_H */
|