From patchwork Sat Sep 24 13:50:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9349187 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3B87607F0 for ; Sat, 24 Sep 2016 13:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92B9228944 for ; Sat, 24 Sep 2016 13:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8389129236; Sat, 24 Sep 2016 13:50:44 +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=-6.9 required=2.0 tests=BAYES_00,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 02D3C28944 for ; Sat, 24 Sep 2016 13:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933514AbcIXNum (ORCPT ); Sat, 24 Sep 2016 09:50:42 -0400 Received: from mout.web.de ([212.227.17.11]:57199 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933339AbcIXNul (ORCPT ); Sat, 24 Sep 2016 09:50:41 -0400 Received: from [192.168.1.2] ([78.53.181.42]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0Lj2I6-1bF11f1U0U-00dH6t; Sat, 24 Sep 2016 15:50:37 +0200 Subject: [PATCH 4/4] Input-gameport: Replace some printk() calls by pr_info() in joydump_connect() To: linux-input@vger.kernel.org, Dmitry Torokhov References: Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: Date: Sat, 24 Sep 2016 15:50:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:CNK0txq0MTwQ6/nyJe8HDW05XlgaTVWSPWrlvtjHSUJ/T/Rm0j9 IGXOpaFApjWuPSJK02wukVbBBTSZls+S/8p0okO+/NBo6wmbkRZnV6B4IARJYpCeC7AFve/ GqKli9gEayRul068SisCt82OpQ5100LorOt5BnAtowQiw3empj6EWZvTzefxiVZKz86JK9S X1loJ0VqxJ70azbuuQ7xQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:srXPjhEVIXs=:4ASyZcygYuzL7py2ksbs95 PkT6hOkEMO4tLuEqgaPKyhzQq2UkraE9NVf/kHJsFKKayHJ3H1ZVaUQqB4fdDuYOQyntNIC7H 5i34Uvf0asRvd3UtTc7Ah6N5WQwcuEE2zGsq52SQ6NddtVat5D9kLz820DcEt+/RI+EXBCfA4 BaVtQeJHXo3VeKWt5BFYRg8PYQngZGsSXdrGSV95nedblr31byPupmVU88o8o1kQdzvImQ2Hs uIxeV8IBHwidYrkVFod8QliQu2GbHmBdF+3UbACyMeRVQ9ZiGDThAaZMrEasHKBB4jyiPqbdc 1TORK3YyvDv3sDw6/9g824sinP60pNt/DYKGI4TpEv/29ARye1thJe90vX3WOnxmypihavTbs soUKDTnl7+1uzJbYRB1AUMgAVZyK9TArOutK3krHxo8ODnZt2iSO9Q/oVoiWamFffx+Dv8GSn GbmPp6qAB5l3BYnc2JjXIaJGSXfI5N0Q7/Z2+bn6SehG0LEBhsGBQY8YLgfNoOaYtIpLi6n3Z 0dj52Wra8t0BNpPCEmE3xfp0Zvl2Fa+vxkkTV/tF0QUynuh6oywmh8vVJZOQTvdy8BXTC7NVx 3rvh//2MYYnMTsKJLJ6NZFIuffkzXj+HsVmw3I8LQw4sgqUAGzeW2HnWgiBMdU6qbyHzSr180 luWlL6frfynqgvZbBAJMIcku5LWtZdwmrVaJF3zpvljkCxh1rEnX0TpaG/gnOiLepMbRtLigD W+l+y1bCcZe1+byiPRa0EZIpcZGQ5aFUNJHyumi97HPDpPbBVYWBiDREiAnjlxb8i11oRpNGi U6T8SuJ 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 From: Markus Elfring Date: Sat, 24 Sep 2016 15:12:21 +0200 * Prefer usage of the macro "pr_info" over the interface "printk" in this function. * Reduce number of output function calls. Signed-off-by: Markus Elfring --- drivers/input/joystick/joydump.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/input/joystick/joydump.c b/drivers/input/joystick/joydump.c index a38f10e..02ea60c 100644 --- a/drivers/input/joystick/joydump.c +++ b/drivers/input/joystick/joydump.c @@ -57,27 +57,29 @@ static int joydump_connect(struct gameport *gameport, struct gameport_driver *dr unsigned long flags; unsigned char u; - printk(KERN_INFO "joydump: ,------------------ START ----------------.\n"); - printk(KERN_INFO "joydump: | Dumping: %30s |\n", gameport->phys); - printk(KERN_INFO "joydump: | Speed: %28d kHz |\n", gameport->speed); + pr_info(",------------------ START ----------------.\n" + "| Dumping: %30s |\n" + "| Speed: %28d kHz |\n", + gameport->phys, + gameport->speed); if (gameport_open(gameport, drv, GAMEPORT_MODE_RAW)) { - - printk(KERN_INFO "joydump: | Raw mode not available - trying cooked. |\n"); - + pr_info("| Raw mode not available - trying cooked. |\n"); if (gameport_open(gameport, drv, GAMEPORT_MODE_COOKED)) { - - printk(KERN_INFO "joydump: | Cooked not available either. Failing. |\n"); - printk(KERN_INFO "joydump: `------------------- END -----------------'\n"); + pr_info("| Cooked not available either. Failing. |\n" + "`------------------- END -----------------'\n"); return -ENODEV; } gameport_cooked_read(gameport, axes, &buttons); for (i = 0; i < 4; i++) - printk(KERN_INFO "joydump: | Axis %d: %4d. |\n", i, axes[i]); - printk(KERN_INFO "joydump: | Buttons %02x. |\n", buttons); - printk(KERN_INFO "joydump: `------------------- END -----------------'\n"); + pr_info("| Axis %d: %4d. |\n", + i, + axes[i]); + pr_info("| Buttons %02x. |\n" + "`------------------- END -----------------'\n", + buttons); } timeout = gameport_time(gameport, 10000); /* 10 ms */ @@ -121,16 +123,15 @@ static int joydump_connect(struct gameport *gameport, struct gameport_driver *dr t = i; dump = buf; prev = dump; - - printk(KERN_INFO "joydump: >------------------ DATA -----------------<\n"); - printk(KERN_INFO "joydump: | index: %3d delta: %3d us data: ", 0, 0); + pr_info(">------------------ DATA -----------------<\n" + "| index: %3d delta: %3d us data: ", 0, 0); for (j = 7; j >= 0; j--) printk("%d", (dump->data >> j) & 1); printk(" |\n"); dump++; for (i = 1; i < t; i++, dump++, prev++) { - printk(KERN_INFO "joydump: | index: %3d delta: %3d us data: ", + pr_info("| index: %3d delta: %3d us data: ", i, dump->time - prev->time); for (j = 7; j >= 0; j--) printk("%d", (dump->data >> j) & 1); @@ -139,8 +140,7 @@ static int joydump_connect(struct gameport *gameport, struct gameport_driver *dr kfree(buf); jd_end: - printk(KERN_INFO "joydump: `------------------- END -----------------'\n"); - + pr_info("`------------------- END -----------------'\n"); return 0; }