From patchwork Thu Apr 20 08:27:29 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: 9689867 X-Patchwork-Delegate: sboyd@codeaurora.org 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 6DE0E600C8 for ; Thu, 20 Apr 2017 08:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53A252845C for ; Thu, 20 Apr 2017 08:29:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 451C128448; Thu, 20 Apr 2017 08:29:26 +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 DCCE628448 for ; Thu, 20 Apr 2017 08:29:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942399AbdDTI1h (ORCPT ); Thu, 20 Apr 2017 04:27:37 -0400 Received: from mout.web.de ([212.227.15.14]:57265 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942296AbdDTI1g (ORCPT ); Thu, 20 Apr 2017 04:27:36 -0400 Received: from [192.168.1.2] ([77.182.247.81]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LnVr4-1cN6eS2d0I-00hbjG; Thu, 20 Apr 2017 10:27:30 +0200 Subject: [PATCH 4/8] clk: Replace four seq_printf() calls by seq_putc() From: SF Markus Elfring To: linux-clk@vger.kernel.org, Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org References: <94b24eaa-c5fb-80ea-441a-883989d14ef5@users.sourceforge.net> Message-ID: <3f7979fe-3dc0-e6d1-b13b-ea3d990ecf91@users.sourceforge.net> Date: Thu, 20 Apr 2017 10:27:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <94b24eaa-c5fb-80ea-441a-883989d14ef5@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:p9YyDO6co7xc/ZkxNSbP8reMSBpfhw6jnhdT2nJYleUtS9uEjbu 3vJNutkGnAN02QXJ+YKtMxsZssS3MKzYdT2VVmxgd2UYQLWxZRBqTvWNitQhbb+JdoPB995 j7DAEWG66Qat3N387PPleblJyhWpU3ucr533TfwWwAOzeAD8awE3n3X81wd0ccGkHsKLPTZ 5of8FD9bPloO78R/E4UTA== X-UI-Out-Filterresults: notjunk:1; V01:K0:W9qWfD66KBQ=:L/NEhfuw9VoeV1j/9FOMVl frt9bnScYP45RuN3y1puFUo1rcpPrzv4P2Rjle9VuiLCUyfDptf/ISMzIRIeF6MN9ZkVIXBbb T92MIAEU/KoOv/0ZPLmlUMuV2DiFcCrtOKpqXOsPL+RAIO0N4MrFs7wpgHYBZkyjLydRtDV7Z hTpaQFR5mScgKFThF9wJH0WrhSLVzQ6FvVK/zva59vbAL7RUpe1tOewPXRtYJmI4sIam6qyD8 8wWsoXfIcnxLfJ4x45BzR/uJCPHsujOW29EnXUePY6B4bHHln+2ZpnqLsLEeKAh8Sref8PHWm YS7n6bBXxAgmPlSrNqIUQfws5KXtTQfzqiu0oVLNIF2d4/2zs06s84Eh+1gOmY6QOH5QVd568 zrO3w+gJfiyb9VpKDKSCbO3wll7j4/Wk3q+SYJBpIW+LvX7hyx1WIfNF6GlzHbFwGqX0+S8RA 3LmKzC5U7hQeGNs3n8Yet6LBGw7fsQDdFjQrrtFchS9pvqC2ZZ0iwSsn4H4GXNETDmPOtHkSE M83tYT4tEdZ5/vYmlBRNf84qZDKX+qzGsY4RhIQistKQX6AFkyZqlwxIiccrqHo2eDDTdqEzR z2xVrOnDefrue89+NiY3l4c8dYOLs7KU6/2rk8tSrq2ZOFsHBBkixcU0Ba+df/H0RM4k8rAY2 phOqYu76pG6pElMOJLHyNUNj+JJZ3+kKMM4TgtfLWWhPsLBFz0H4nCWdEcB6O7lvLemrukgmO zKpGnycEW0bVSiAxbMPSG1qJ7Tv+8pBjr7reDOtAa/uLLqAL/Tznn1SNKLz1VTPr4B3KA3Dq6 FsW32Pe Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 20 Apr 2017 08:45:43 +0200 Four 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 --- drivers/clk/clk.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 67201f67a14a..4c72a10a9a33 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2081,11 +2081,11 @@ static void clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level) clk_dump_one(s, c, level); hlist_for_each_entry(child, &c->children, child_node) { - seq_printf(s, ","); + seq_putc(s, ','); clk_dump_subtree(s, child, level + 1); } - seq_printf(s, "}"); + seq_putc(s, '}'); } static int clk_dump(struct seq_file *s, void *data) @@ -2094,14 +2094,13 @@ static int clk_dump(struct seq_file *s, void *data) bool first_node = true; struct hlist_head **lists = (struct hlist_head **)s->private; - seq_printf(s, "{"); - + seq_putc(s, '{'); clk_prepare_lock(); for (; *lists; lists++) { hlist_for_each_entry(c, *lists, child_node) { if (!first_node) - seq_puts(s, ","); + seq_putc(s, ','); first_node = false; clk_dump_subtree(s, c, 0); }