From: Tilman Schmidt <tilman@imap.cc>
To: davem@davemloft.net, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Cc: Hansjoerg Lipp <hjlipp@web.de>
Subject: [PATCH 4/8] gigaset: skip unnecessary hex formatting
Date: Thu, 14 May 2009 00:44:17 +0200 (CEST) [thread overview]
Message-ID: <20090514-patch-04.tilman@imap.cc> (raw)
In-Reply-To: <20090514-patch-00.tilman@imap.cc>
Don't generate the hex representation of the payload data if it
isn't actually used afterwards.
Impact: optimization
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
drivers/isdn/gigaset/isocdata.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c
index b171e75..09202a5 100644
--- a/drivers/isdn/gigaset/isocdata.c
+++ b/drivers/isdn/gigaset/isocdata.c
@@ -246,6 +246,10 @@ static inline void dump_bytes(enum debuglevel level, const char *tag,
unsigned char c;
static char dbgline[3 * 32 + 1];
int i = 0;
+
+ if (!(gigaset_debuglevel & level))
+ return;
+
while (count-- > 0) {
if (i > sizeof(dbgline) - 4) {
dbgline[i] = '\0';
--
1.6.2.1.214.ge986c
next prev parent reply other threads:[~2009-05-13 22:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-13 22:44 [PATCH 0/8] Gigaset driver bugfixes and cleanups Tilman Schmidt
2009-05-13 22:44 ` [PATCH 2/8] gigaset: fix possible oops in error handling Tilman Schmidt
2009-05-13 22:44 ` Tilman Schmidt [this message]
2009-05-13 22:44 ` [PATCH 1/8] gigaset: documentation update Tilman Schmidt
2009-05-13 22:44 ` [PATCH 5/8] gigaset: remove obsolete references to m10x state table Tilman Schmidt
2009-05-13 22:44 ` [PATCH 3/8] gigaset: fix error return code Tilman Schmidt
2009-05-13 22:44 ` [PATCH 7/8] gigaset: remove UNDOCREQ config option Tilman Schmidt
2009-05-13 22:44 ` [PATCH 8/8] gigaset: move up Kconfig inclusion point Tilman Schmidt
2009-05-13 22:44 ` [PATCH 6/8] gigaset: remove unused structure member rcvbytes Tilman Schmidt
2009-05-18 3:51 ` [PATCH 0/8] Gigaset driver bugfixes and cleanups David Miller
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=20090514-patch-04.tilman@imap.cc \
--to=tilman@imap.cc \
--cc=davem@davemloft.net \
--cc=hjlipp@web.de \
--cc=linux-kernel@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).