x25: use %*ph to print small buffer
authorAntonio Cardace <anto.cardace@gmail.com>
Mon, 19 Feb 2018 11:37:15 +0000 (11:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Feb 2018 18:51:47 +0000 (13:51 -0500)
Use %*ph format to print small buffer as hex string.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Antonio Cardace <anto.cardace@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/x25/x25_subr.c

index db0b1315d577aa72d2bf53bac0c78cc87e7a67ec..9c214ec681ac88cb48a5eac7bc43a5edef4d0a2a 100644 (file)
@@ -335,8 +335,7 @@ int x25_decode(struct sock *sk, struct sk_buff *skb, int *ns, int *nr, int *q,
                }
        }
 
-       pr_debug("invalid PLP frame %02X %02X %02X\n",
-              frame[0], frame[1], frame[2]);
+       pr_debug("invalid PLP frame %3ph\n", frame);
 
        return X25_ILLEGAL;
 }