Browse Source

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 <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt 16 năm trước cách đây
mục cha
commit
1315d69634
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      drivers/isdn/gigaset/isocdata.c

+ 4 - 0
drivers/isdn/gigaset/isocdata.c

@@ -246,6 +246,10 @@ static inline void dump_bytes(enum debuglevel level, const char *tag,
 	unsigned char c;
 	unsigned char c;
 	static char dbgline[3 * 32 + 1];
 	static char dbgline[3 * 32 + 1];
 	int i = 0;
 	int i = 0;
+
+	if (!(gigaset_debuglevel & level))
+		return;
+
 	while (count-- > 0) {
 	while (count-- > 0) {
 		if (i > sizeof(dbgline) - 4) {
 		if (i > sizeof(dbgline) - 4) {
 			dbgline[i] = '\0';
 			dbgline[i] = '\0';