From: Gregory CLEMENT Date: Tue, 12 May 2020 11:53:21 +0000 (+0200) Subject: tty: n_gsm: Improve debug output X-Git-Tag: v5.8-rc1~107^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe92c2a801267c3d90240752a9df542174794567;p=thirdparty%2Fkernel%2Flinux.git tty: n_gsm: Improve debug output Use appropriate print helpers for debug messages. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20200512115323.1447922-2-gregory.clement@bootlin.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index d77ed82a4840e..67c8f8173023d 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -504,18 +504,8 @@ static void gsm_print_packet(const char *hdr, int addr, int cr, else pr_cont("(F)"); - if (dlen) { - int ct = 0; - while (dlen--) { - if (ct % 8 == 0) { - pr_cont("\n"); - pr_debug(" "); - } - pr_cont("%02X ", *data++); - ct++; - } - } - pr_cont("\n"); + if (dlen) + print_hex_dump_bytes("", DUMP_PREFIX_NONE, data, dlen); }