From: Tilman Schmidt Date: Wed, 13 May 2009 12:44:17 +0000 (+0000) Subject: gigaset: skip unnecessary hex formatting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1315d69634834f1f485b21b0ed8f10b763a675d2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git gigaset: skip unnecessary hex formatting Don't generate the hex representation of the payload data if it isn't actually used afterwards. Impact: optimization Signed-off-by: Tilman Schmidt Signed-off-by: David S. Miller --- diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index b171e75cb52e..09202a5a3444 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';