From patchwork Mon May 1 16:46:15 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: 9706723 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 99C48602B5 for ; Mon, 1 May 2017 16:51:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C27F22701 for ; Mon, 1 May 2017 16:51:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F6492807E; Mon, 1 May 2017 16:51:39 +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 1A15422701 for ; Mon, 1 May 2017 16:51:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 78E3489A75; Mon, 1 May 2017 16:51:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 355 seconds by postgrey-1.35 at gabe; Mon, 01 May 2017 16:51:34 UTC Received: from mout.web.de (mout.web.de [212.227.15.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 289E189A75 for ; Mon, 1 May 2017 16:51:34 +0000 (UTC) Received: from [192.168.1.2] ([77.181.166.232]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MGzK6-1dHrWF1rQQ-00DroJ; Mon, 01 May 2017 18:46:17 +0200 Subject: [PATCH 1/4] drm/dp: Use seq_putc() 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: Date: Mon, 1 May 2017 18:46:15 +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:iVaY2MBCDIDCR//5BmbUZM28ViDMl0pzi1FR6CvHif8omVIfY5S cE2edn6UvtPQJ5K/DQkhm264eg5d1zsRX13xB/v9eaT4ByvvD5ZqeTC0yB6d5xKNqp13qTV mM0j+Rmn8t0TkzgY7qDt35cniiHJhVeYIyZmdIG8Yh2nWtwqs+H4Lt095rK7g1INCri9xlK +mpl5QEtzPXlAiCuMABvg== X-UI-Out-Filterresults: notjunk:1; V01:K0:UhQrk162DFU=:BRVHhjoP6KcmEZ3J98MQ3z jrS5cOWgLMZ1VftrvzK1btxFE0Uwcv+S+DMoN2NgjmiRqF7cTHeesrLHdGCVjIa0qw+S2tprZ KXdUEHFhh00vsUbLYTMUUWUsE7GkScCjX1qFhSVCkTKxuuwUivjMmbe7238i435ujq2yrhbam +DwmGJcxQqRsBnVMFLVD5dDPElb398Sx9Df4TfSLiotbOhMYeLaHdu8+yekd4AiiVt6isBFtB 2KRZoVK4p5rr4tWjUp0S3JR5QqcayNjYxqP9P7aZAQSQbLDtaQQtf/W9NPbBoOmtj/hvlESR7 6kpzHY102Pp7pMLObEoL6gMKOrPoumfTJstqWAB+nqSYThLD0QLdZlusxk6f6hqIqu7L2F1NO K30ajRz0os238TLnmqei2ILwyLEhKzbpxulRY0hLXCNHydRr6oLkK85+XsvPMhaF0mvVIgDXy vRthr8+2aswT3X2B03mD305HpwTgF7mHQCGK9jEutaseN5LKeYw4UZbskueczbqyDZ5c4vSkO 8w7ercHVkeIFSBbI0PkKXsrzAzkasdo/HRgZg2k1sBRvgNckpyxKHrEWM8fdNl6hGsqWzGP01 8uvkZhm1mMoTSRXTkW4lgMmD0nFRSS6EfPjm7HmByM3AHJHQKwP5m/7Ey0XXMJBte5yNJ/GAG meIjUpk7N9YXPGFAMjGINkA6Zrfqyjh4ngxofI0ocxuLXcDGYzNGnBqZSKlR8vB7g5svfCOfn 6pVegEzVfX+0R92RnNEleG4ImQjSb4IqYfR47tMqJ9eeYJwTy37iOVbSHO3cww0otc1HHg6o8 4CrYSlN 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:08:56 +0200 A few single characters (line breaks) 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/gpu/drm/drm_dp_mst_topology.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index d3fc7e4e85b7..89fc05fa6a74 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2840,17 +2840,17 @@ void drm_dp_mst_dump_topology(struct seq_file *m, seq_printf(m, "dpcd: "); for (i = 0; i < DP_RECEIVER_CAP_SIZE; i++) seq_printf(m, "%02x ", buf[i]); - seq_printf(m, "\n"); + seq_putc(m, '\n'); ret = drm_dp_dpcd_read(mgr->aux, DP_FAUX_CAP, buf, 2); seq_printf(m, "faux/mst: "); for (i = 0; i < 2; i++) seq_printf(m, "%02x ", buf[i]); - seq_printf(m, "\n"); + seq_putc(m, '\n'); ret = drm_dp_dpcd_read(mgr->aux, DP_MSTM_CTRL, buf, 1); seq_printf(m, "mst ctrl: "); for (i = 0; i < 1; i++) seq_printf(m, "%02x ", buf[i]); - seq_printf(m, "\n"); + seq_putc(m, '\n'); /* dump the standard OUI branch header */ ret = drm_dp_dpcd_read(mgr->aux, DP_BRANCH_OUI, buf, DP_BRANCH_OUI_HEADER_SIZE); @@ -2868,7 +2868,7 @@ void drm_dp_mst_dump_topology(struct seq_file *m, seq_printf(m, "payload table: "); for (i = 0; i < 63; i++) seq_printf(m, "%02x ", buf[i]); - seq_printf(m, "\n"); + seq_putc(m, '\n'); } }