gigaset: skip unnecessary hex formatting
authorTilman Schmidt <tilman@imap.cc>
Wed, 13 May 2009 12:44:17 +0000 (12:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 May 2009 03:51:25 +0000 (20:51 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/isocdata.c

index b171e75cb52e51f920125abc984648f22415e961..09202a5a34446daaecb7ce7ab315367f93a37df9 100644 (file)
@@ -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';