From patchwork Fri May 5 13:52:05 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: 9713591 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 99C8F602B9 for ; Fri, 5 May 2017 13:52:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 817692861E for ; Fri, 5 May 2017 13:52:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75C0E28630; Fri, 5 May 2017 13:52:14 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 063222861E for ; Fri, 5 May 2017 13:52:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D58F6E68D; Fri, 5 May 2017 13:52:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.15.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 837306E68D for ; Fri, 5 May 2017 13:52:12 +0000 (UTC) Received: from [192.168.1.3] ([78.48.246.181]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MYw31-1dcNYy1G0x-00Vgr4; Fri, 05 May 2017 15:52:07 +0200 Subject: [PATCH 1/5] drm/sti: Reduce function calls for sequence output at five places From: SF Markus Elfring To: dri-devel@lists.freedesktop.org, Benjamin Gaignard , David Airlie , Fabien Dessenne , Vincent Abriou References: Message-ID: <1f5c5b0d-77c4-6efc-7906-cee76c33d2b0@users.sourceforge.net> Date: Fri, 5 May 2017 15:52:05 +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: Content-Language: en-US X-Provags-ID: V03:K0:y0Jz04eeK26dqSD/Q6ud8rG4WYxE4MFmGP70DyoquznlEpAUOje Nh40y/x4aVVlmjAs13mqYvUh4Pht9oZARCvpy+Nzr3WpjjOw2a+wgLPe/7IxG7s3fFVJ/Jq /Ru/L4Cpof7Loxl7y6n1l0C/OrIH4Vbz4QO/0A6T4VCXRadlvMRPHS8uUJgDKC6isiI9NDb DSnXhLuselYRTq4fTdmFQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:WhqGDxYvUp0=:JknY5gdifFqfuNl5JzYu4K u8E7nOFnzLtJo5Kqen8YiOUU/HsOAR1iZ039WqnP2+oGy+Csgpn7SVhK8hc/2bnEUOdlQx1Gy ufXHm/HMj1Jg/fKlAEY4dULYeO0zphI4arI53YC7DSSqkWWrPDpvQgS5iRjOi8dGNDqUD5ZYY HWl9uYHzVVmHTeRsBMczJibXbeKQtbe+Wi9uW6oh4syEYE1b64sn0Rhl4Cyv0xEML6MHUE+Ex xCx/fQym/9GRWPY/BezWYTeOUIRKbCeVZNHcREg3/gCFsR7Hw+Hm8G/z48o+o7fVAHSMNw62J k0SmHyM2KvDI96EU3dy2FLUjso6dVcnNYFxNgJD7Cpuqzb1BzrDgCZzmYAZnrJSlfCEI5Ya8y hQVlII6zmW5pmh6mfVVsHFJI/I1E6u5yiIMRQP8cRzbp7hx6N+9lw/bR+6ZK7/Ksk+h+yMI9x bmQ382tIlSGvWuPIdojBOc4JfRb0f8kgJzzMqpbPAFpIe2LSYQI34+E5DgeYcNI4FvYaUWle/ /2gebHJ6LArDh03SXTUBbwH+O4Z4gu3aXclQmABqWTrHbaOHIIFFLGb99JHPCpibdIM7nJjD0 NLdm9wBTHSaKDsbAGL7uLcxfj6XWEjDchRJIueG3mdV6DHCQjExaPUe+gUTcYR77CP3xN7Lsv AseLg7m5m3ukpaA4vHIN8JyA22Z6psNy2GJOMRn9kgH46DwZ7LgoBnswqcdqXdCI9TYP1iez6 LAmQxjL73pYG2ReI1Ga72kmilZ3FhtVIw6/DlrNkpfRXMQ/v2LO/953P+S7C8LNwsqkS+MUg4 Vd1J8c+ Cc: kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Fri, 5 May 2017 14:54:52 +0200 Some data were put into a sequence by separate function calls. Print the same data by five single function calls instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/sti/sti_gdp.c | 3 +-- drivers/gpu/drm/sti/sti_hda.c | 6 ++---- drivers/gpu/drm/sti/sti_hdmi.c | 6 ++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 88f16cdf6a4b..3caced5f2e86 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c @@ -266,8 +266,7 @@ static void gdp_node_dump_node(struct seq_file *s, struct sti_gdp_node *node) seq_printf(s, "\n\tKEY2 0x%08X", node->gam_gdp_key2); seq_printf(s, "\n\tPPT 0x%08X", node->gam_gdp_ppt); gdp_dbg_ppt(s, node->gam_gdp_ppt); - seq_printf(s, "\n\tCML 0x%08X", node->gam_gdp_cml); - seq_puts(s, "\n"); + seq_printf(s, "\n\tCML 0x%08X\n", node->gam_gdp_cml); } static int gdp_node_dbg_show(struct seq_file *s, void *arg) diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c index 0c0a75bc8bc3..e3475a17eaeb 100644 --- a/drivers/gpu/drm/sti/sti_hda.c +++ b/drivers/gpu/drm/sti/sti_hda.c @@ -320,8 +320,7 @@ static void hda_dbg_awg_microcode(struct seq_file *s, void __iomem *reg) { unsigned int i; - seq_puts(s, "\n\n"); - seq_puts(s, " HDA AWG microcode:"); + seq_puts(s, "\n\n HDA AWG microcode:"); for (i = 0; i < AWG_MAX_INST; i++) { if (i % 8 == 0) seq_printf(s, "\n %04X:", i); @@ -333,8 +332,7 @@ static void hda_dbg_video_dacs_ctrl(struct seq_file *s, void __iomem *reg) { u32 val = readl(reg); - seq_puts(s, "\n"); - seq_printf(s, "\n %-25s 0x%08X", "VIDEO_DACS_CONTROL", val); + seq_printf(s, "\n\n %-25s 0x%08X", "VIDEO_DACS_CONTROL", val); seq_puts(s, "\tHD DACs "); seq_puts(s, val & DAC_CFG_HD_HZUVW_OFF_MASK ? "disabled" : "enabled"); } diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index 243905b6ae59..52cdff651c0d 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.c +++ b/drivers/gpu/drm/sti/sti_hdmi.c @@ -692,8 +692,7 @@ static int hdmi_dbg_show(struct seq_file *s, void *data) DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD4, HDMI_IFRAME_SLOT_AVI); DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD5, HDMI_IFRAME_SLOT_AVI); DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD6, HDMI_IFRAME_SLOT_AVI); - seq_puts(s, "\n"); - seq_printf(s, "\n AUDIO Infoframe (Data Island slot N=%d):", + seq_printf(s, "\n\n AUDIO Infoframe (Data Island slot N=%d):", HDMI_IFRAME_SLOT_AUDIO); DBGFS_DUMP_DI(HDMI_SW_DI_N_HEAD_WORD, HDMI_IFRAME_SLOT_AUDIO); DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD0, HDMI_IFRAME_SLOT_AUDIO); @@ -703,8 +702,7 @@ static int hdmi_dbg_show(struct seq_file *s, void *data) DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD4, HDMI_IFRAME_SLOT_AUDIO); DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD5, HDMI_IFRAME_SLOT_AUDIO); DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD6, HDMI_IFRAME_SLOT_AUDIO); - seq_puts(s, "\n"); - seq_printf(s, "\n VENDOR SPECIFIC Infoframe (Data Island slot N=%d):", + seq_printf(s, "\n\n VENDOR SPECIFIC Infoframe (Data Island slot N=%d):", HDMI_IFRAME_SLOT_VENDOR); DBGFS_DUMP_DI(HDMI_SW_DI_N_HEAD_WORD, HDMI_IFRAME_SLOT_VENDOR); DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD0, HDMI_IFRAME_SLOT_VENDOR);