From patchwork Mon May 1 16:47:21 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: 9706731 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 E225D6020B for ; Mon, 1 May 2017 17:00:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D168220008 for ; Mon, 1 May 2017 17:00:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2503203B9; Mon, 1 May 2017 17:00:29 +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 5E54D20008 for ; Mon, 1 May 2017 17:00:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DDB9D8979D; Mon, 1 May 2017 17:00:28 +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 7C1C28979D for ; Mon, 1 May 2017 17:00:27 +0000 (UTC) Received: from [192.168.1.2] ([77.181.166.232]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MaJse-1dOyHq3G4e-00Jo2x; Mon, 01 May 2017 18:47:22 +0200 Subject: [PATCH 2/4] drm/dp: Combine two seq_printf() calls into one call in drm_dp_mst_dump_topology() From: SF Markus Elfring To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Jani Nikula , Sean Paul References: <1949e36b-5039-a7b6-5774-6ada7eb05ea6@users.sourceforge.net> Message-ID: <0632f7bd-e58c-0b7d-163d-7e1a6e97ff25@users.sourceforge.net> Date: Mon, 1 May 2017 18:47:21 +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: <1949e36b-5039-a7b6-5774-6ada7eb05ea6@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:mAS3+HG+cOwnNvlEWk/B3VDVv6CerYrEQ8QLxE98XKYksDBa6kY Ifz+fQDAziEUlKFARQZRvNXQT8hvjaSGOHHel4LuA3F+tyKd88G7W3a3POkD/qDc4JnMMQE tWUDydOD9CeScCi44Ii9hs7rPv0IVW1iBrc6Kdw/sACeH7IoIA7kk7kior+96uDlTvpVitY nqF1foC6VxAFn5/fWwVyQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:OpQzZQlzsTY=:yyGFg5lEluXiBZQ3RRo/ff FMOrQHeBUMTtrr9/Ec8hXipt5boJQD3RznvYV0CNu9xR+D5aBHkyo5YoGcPW7iAHugGXzv/9H U+qdzPksB5RwMexN5vPvajP4H1JbjmC5nEiHh8Y7PPxgTgLiCneMitFB2BV4TFG/fimiYFCJ5 q0O6F3ICqpUwyjrLyWuk0LIwUMOBThnACEqGPWC7FiuVzl783npQoXXWfHx0ikpxlsmDn31Xb Mjz4gf1dAphOwe09/cDz0MOhLR3ta8PBLyw/xyMARGqvdV7yoeXHKWmbJlTqRxkhpdMD1UmRL bH44GGHK2T80Ol7uFPZPsbyC/Pmj9I5qpfOeTPjSTmcHftrAtK1gPpwSZJfBgDYdpdC+yVbsz Vj26rsubp4AcY9WzEA2SXRS98yjaVvGf3aQMMEcJvUC2VV+efuW0Rhvja6vgQk8gByiFIJfMe ZxSp7YpRLRIDXGWmlIYefvNcDC232vQ1M9MnmOt05qkVLoOnTcyfwJyNLG2zXsHAZ9DQFsp+t 2g8NZAS5ZdYQa4NrIB/RnmzmIgUr3FeqyqxMXAxyhl9iBLdD65/y3n7sKaAicGCdPYxsbxQru cyrhRALdVXqdjVj4RW7vW2CfP/kzoN6HC6qe+MUZfik67L6pckgSsCpVr3zpwyXVuJVcRRvq2 HecuRUmfU+mlEiO/tz7Bk4wJsx2LM14tPAm/aE82+N7Bp3BNCaef3rsipJwMLu2a2H9pfu62N toHm6IZzCjc2Pr1GyxqZbSksrB9i4GJNU0PHw7HECcGbfY/6V6Wb8HYUERRbXgrd+inALL6Rk MvX2upv 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: Mon, 1 May 2017 17:15:43 +0200 Some data were put into a sequence by two separate function calls. Print the same data by a single function call instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 89fc05fa6a74..2ddcb3d2f65a 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2861,8 +2861,8 @@ void drm_dp_mst_dump_topology(struct seq_file *m, for (i = 0x3; i < 0x8 && buf[i]; i++) seq_printf(m, "%c", buf[i]); - seq_printf(m, " revision: hw: %x.%x sw: %x.%x", buf[0x9] >> 4, buf[0x9] & 0xf, buf[0xa], buf[0xb]); - seq_printf(m, "\n"); + seq_printf(m, " revision: hw: %x.%x sw: %x.%x\n", + buf[0x9] >> 4, buf[0x9] & 0xf, buf[0xa], buf[0xb]); bret = dump_dp_payload_table(mgr, buf); if (bret == true) { seq_printf(m, "payload table: ");