From patchwork Wed May 3 18:35:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9710275 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 8A20F6021C for ; Wed, 3 May 2017 18:35:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FB5628650 for ; Wed, 3 May 2017 18:35:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7484428692; Wed, 3 May 2017 18:35:32 +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 24F0D28650 for ; Wed, 3 May 2017 18:35:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753309AbdECSfb (ORCPT ); Wed, 3 May 2017 14:35:31 -0400 Received: from mout.web.de ([212.227.15.4]:54948 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbdECSfa (ORCPT ); Wed, 3 May 2017 14:35:30 -0400 Received: from [192.168.1.2] ([78.49.19.122]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Ljahc-1dd80i1iiu-00bbqf; Wed, 03 May 2017 20:35:24 +0200 Subject: [PATCH 1/2] blk-mq-debugfs: Replace seven seq_puts() calls by seq_putc() From: SF Markus Elfring To: linux-block@vger.kernel.org, Bart Van Assche , Jens Axboe Cc: LKML , kernel-janitors@vger.kernel.org References: <507a3eee-6dfe-c218-1056-38221bd22be7@users.sourceforge.net> Message-ID: Date: Wed, 3 May 2017 20:35:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <507a3eee-6dfe-c218-1056-38221bd22be7@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:Befa2rol+j2yVdhywwSD3HOO6zCP7nKOMcHfxc9ppqI/iBj0/ds 9PcHanpRzXkXJDir/HeowgoNpTo87v2q03hbg5+DQxkDg+EJPVVGaWbNYQbCdZl5REMffNo z6tchypgsUOoyzvkh2P0e1KOPnozfXZrMy0de9+mhW1j+a3p/rrMGLTopBSP0D1Fn9MIKFj SEyC9/nJ5DytExFE1ukpQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:mqNMG8DT7KE=:+VbdhF2ywDYVevU3z3reTs oYOIqwhQ+aIBIGgyqllfaAVVRxiRsShGq3ut+prH6IdDG5zaVlAyH0T5fqtpiwE0+TSKjyXdn hIUZQXwm30nVjUJmrszpL2zt+K5nwDH3DBhAkR2+f8LgvWBvaQBYUKoX3VX/jYTJL7k+z+BuE +u+KtqvdP9/gX+ompPRIPDnI8Ahdil927WUKfrGAiEMjfp1mO67sAjB3+be6ujE/B/kvz+9GC 003bJ0Snnioq+PGyILTceTCJB5aEg6j9Y37GVF+E7nT9tbaIRw3lWw76rsRnQsvwZgGepRyby pszIGtkGrM3vgkuaoqLix+LwmrnyQGc3HRYCxmryR0Bxh0hV//ejxup3xbOSaPh+0ozpAyl0J 7LdF7LE50+LGliwgEtYx0VEH3SoMTaFfep3vIRW5+j9eUozIEd5k79+KyhdzsmiA4rY1nrevx 49FlY2EldabrsXQ13GY5Qm+ZQbR98DU444P2JqrtnnYU9rRozlzzcWZUrp9YAVUoTqfQ2y483 pgQgQTMxpg2DVyz0BGL/rPvnwQa1Q+FxiJAxjqRpRWCbPI2WxZtcgJVYy8JViG0uS3s+HNS2W fyqpglI8Ig4l7LTHdjQz3aUomB5gAhAeAZnkNSfJy6HtuQGU/+rETHe3bPgNggSljWIhW28GH etk70zLQzQ+tqwjnliBtWbNn1TowsRVTO43Ib9+mRfowo2bQr4r2H98e0t9KgYiEN/PiT4muM 0/xV8jRf34VuUjgLHpEC24T21y1F7yClOgvFX5jQ6OxYlZ5HCHuxXaiAAnR444at7veLwBGMM zD6HKOs Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 3 May 2017 20:00:49 +0200 A few single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- block/blk-mq-debugfs.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index bcd2a7d4a3a5..2265b70b1121 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -53,7 +53,7 @@ static int blk_flags_show(struct seq_file *m, const unsigned long flags, if (!(flags & BIT(i))) continue; if (sep) - seq_puts(m, " "); + seq_putc(m, ' '); sep = true; if (i < flag_name_count && flag_name[i]) seq_puts(m, flag_name[i]); @@ -101,7 +101,7 @@ static int blk_queue_flags_show(struct seq_file *m, void *v) blk_flags_show(m, q->queue_flags, blk_queue_flag_name, ARRAY_SIZE(blk_queue_flag_name)); - seq_puts(m, "\n"); + seq_putc(m, '\n'); return 0; } @@ -159,11 +159,10 @@ static int queue_poll_stat_show(struct seq_file *m, void *v) for (bucket = 0; bucket < BLK_MQ_POLL_STATS_BKTS/2; bucket++) { seq_printf(m, "read (%d Bytes): ", 1 << (9+bucket)); print_stat(m, &q->poll_stat[2*bucket]); - seq_puts(m, "\n"); - + seq_putc(m, '\n'); seq_printf(m, "write (%d Bytes): ", 1 << (9+bucket)); print_stat(m, &q->poll_stat[2*bucket+1]); - seq_puts(m, "\n"); + seq_putc(m, '\n'); } return 0; } @@ -193,7 +192,7 @@ static int hctx_state_show(struct seq_file *m, void *v) blk_flags_show(m, hctx->state, hctx_state_name, ARRAY_SIZE(hctx_state_name)); - seq_puts(m, "\n"); + seq_putc(m, '\n'); return 0; } @@ -233,11 +232,11 @@ static int hctx_flags_show(struct seq_file *m, void *v) seq_puts(m, alloc_policy_name[alloc_policy]); else seq_printf(m, "%d", alloc_policy); - seq_puts(m, " "); + seq_putc(m, ' '); blk_flags_show(m, hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy), hctx_flag_name, ARRAY_SIZE(hctx_flag_name)); - seq_puts(m, "\n"); + seq_putc(m, '\n'); return 0; }