From: Joe Perches <joe@perches.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
Chaoming Li <chaoming_li@realsil.com.cn>
Cc: Kalle Valo <kvalo@codeaurora.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtlwifi: Create _rtl_dbg_trace function to reduce RT_TRACE code size
Date: Mon, 27 Jun 2016 20:55:16 -0700 [thread overview]
Message-ID: <1467086116.24287.11.camel@perches.com> (raw)
In-Reply-To: <5771CA6C.1060403@lwfinger.net>
On Mon, 2016-06-27 at 19:53 -0500, Larry Finger wrote:
> On 06/25/2016 05:46 PM, Joe Perches wrote:
> >
> > This debugging macro can expand to a lot of code.
> > Make it a function to reduce code size.
> >
> > (x86-64 defconfig w/ all rtlwifi drivers and allyesconfig)
> > $ size drivers/net/wireless/realtek/rtlwifi/built-in.o*
> > text data bss dec hex filename
> > 900083 200499 1907 1102489 10d299 drivers/net/wireless/realtek/rtlwifi/built-in.o.defconfig.new
> > 1113597 200499 1907 1316003 1414a3 drivers/net/wireless/realtek/rtlwifi/built-in.o.defconfig.old
> > 1746879 453503 8512 2208894 21b47e drivers/net/wireless/realtek/rtlwifi/built-in.o.new
> > 2051965 503311 8512 2563788 271ecc drivers/net/wireless/realtek/rtlwifi/built-in.o.old
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
> I acked this before; however there is a bug that breaks the build if
> CONFIG_RTLWIFI_DEBUG is not defined. The rest of the code calls
> _rtl_dbg_trace(), but that symbol is never defined. The problem can be fixed in
> debug.c or debug.h.
Confused a bit. What breaks again?
debug.h:
#ifdef CONFIG_RTLWIFI_DEBUG
[]
__printf(5, 6)
void _rtl_dbg_trace(struct rtl_priv *rtlpriv, int comp, int level,
const char *modname, const char *fmt, ...);
#define RT_TRACE(rtlpriv, comp, level, fmt, ...) \
_rtl_dbg_trace(rtlpriv, comp, level, \
KBUILD_MODNAME, fmt, ##__VA_ARGS__)
[]
#else
[]
__printf(4, 5)
static inline void RT_TRACE(struct rtl_priv *rtlpriv,
int comp, int level,
const char *fmt, ...)
{
}
[]
#endif
next prev parent reply other threads:[~2016-06-28 3:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-25 22:46 [PATCH] rtlwifi: Create _rtl_dbg_trace function to reduce RT_TRACE code size Joe Perches
2016-06-27 0:19 ` Larry Finger
2016-06-28 0:53 ` Larry Finger
2016-06-28 3:55 ` Joe Perches [this message]
2016-06-28 14:19 ` Larry Finger
2016-07-08 9:55 ` Kalle Valo
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=1467086116.24287.11.camel@perches.com \
--to=joe@perches.com \
--cc=Larry.Finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).