From patchwork Sun Jul 22 18:50:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Schumacher X-Patchwork-Id: 10539363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED14F1822 for ; Sun, 22 Jul 2018 18:50:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4B51283E2 for ; Sun, 22 Jul 2018 18:50:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3A242841D; Sun, 22 Jul 2018 18:50:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62BA7283E2 for ; Sun, 22 Jul 2018 18:50:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730437AbeGVTsV (ORCPT ); Sun, 22 Jul 2018 15:48:21 -0400 Received: from mout.gmx.net ([212.227.17.20]:45823 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730388AbeGVTsV (ORCPT ); Sun, 22 Jul 2018 15:48:21 -0400 Received: from p2520la.lan ([79.218.124.15]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MP1PX-1fcckP0x0h-006R8J; Sun, 22 Jul 2018 20:50:42 +0200 From: Tim Schumacher Cc: dmitry.torokhov@gmail.com, timschumi@gmx.de, linux-input@vger.kernel.org Subject: [PATCH] input/iforce: Reformat the packet dump output Date: Sun, 22 Jul 2018 20:50:31 +0200 Message-Id: <20180722185031.1554-1-timschumi@gmx.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:dBhl2Ia8zXRQ8BUz+cxDIgc3grcR80d0S9fPKNqlUMhREmLvFHO hjIRJodCbTfhd6P6nvza+owntKYmlbgcLWi/61TmOxtt7G9oyKZYHmQCIX6yg7bbfAZqR/P LgCbdLe+1nRYxurQHAQBf/Iv3AkKJy4zUPwk5cDnIq9x0MD3v47a5E16o4iGkrN26Kw7/q7 gslhwZq/u++F09beDeUMg== X-UI-Out-Filterresults: notjunk:1;V01:K0:M3dW4teZg5o=:TcBZA/x3OcvVXQ/eHhORc+ uq6PMK/Rdwd9EsABB7LGA9KVMtbmZhonw3V/6HjCTNDcKCd2lFinqjdsAWovEGqzv1K9+iNa6 Sbg9FfVR9IZ2E7xr9NMoNKFFc7SoLaoZkGncMFm6LHbon3TmOeKpEGxYQ5rf4FVOxgRxtS5zV EuwT8BnsPFSCoY3WogeLbRWHjJIy1WWLMnWaT0LETs7/VEw6BlwNyOStdGQYn9hfHCCGvbdNL TjlIh/mEaukqEwBb9v+y1Mo8uXfmK/lwFprARDN8PpLzfAQaxZv08aMIggIh/0ugZBwgBjJYm ej15iVZk2YpvG7AILev6xhrYvjSxnUY15bnfAM5EP++1uo2sVB0GoGnTs51tWcM2hJfZD6ocL 9XOOQX1lLqctjMm15kwmVwQ9cvuUHa6JPo+lZmDyNAOaceRXFvmX18V3vdkNsoWASH9+AIYUs 2NqGaMxo0jHJ+gYvHZcy7/RZ1UxZPK/Zyyz62sSxLNsWd2xsSAtCOfchI19VtwYUvcJxIkd7q yxr6xaHyW3bvE2mk9cx0t2b23uSfoz96IBOfNsAwpm4tYYvmGaClqVr1rITuZJd9LAlzYJFzz k8s8gi1HDe8GHdtUfJ90D1IRPLQDDkCoWEkTMWgYsK0xaBsTuIDdYXHtGjQYzPH2T3twihksE MM27mnVZg8a+uMiAc9626qNv7gdbhJUQF+rGlPnbQwmNyw1u+ADclXx7n5oWddfSDb46thBlc 8pu6vifwK8wTpZpXvYnFyr9dCw1iYROYMot3mSSMbzqZF4imGp79hl/VOVg= To: unlisted-recipients:; (no To-header on input) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, packets that are dumped are printed as following in the kernel log: drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff04, data = 56 02 04 00 Make it more appealing and readable by concatenating the data output into one line and shortening the previous file path down to "iforce". The reformatted message would then look like this: iforce: dump_packet info cmd = ff04, data = 56 02 04 00 --- drivers/input/joystick/iforce/iforce-packets.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 08f98f2eaf88..e7fa84874b6e 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -37,10 +37,9 @@ void iforce_dump_packet(char *msg, u16 cmd, unsigned char *data) { int i; - printk(KERN_DEBUG __FILE__ ": %s cmd = %04x, data = ", msg, cmd); + printk(KERN_DEBUG "iforce: dump_packet %s cmd = %04x, data = ", msg, cmd); for (i = 0; i < LO(cmd); i++) - printk("%02x ", data[i]); - printk("\n"); + printk(KERN_CONT "%02x ", data[i]); } /*