From patchwork Mon May 1 16:48:32 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: 9706725 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 04CA2602B5 for ; Mon, 1 May 2017 16:54:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA54C2807E for ; Mon, 1 May 2017 16:53:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEBCD280FC; Mon, 1 May 2017 16:53:59 +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 711C02807E for ; Mon, 1 May 2017 16:53:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 019BE89AA7; Mon, 1 May 2017 16:53:59 +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 5973789AA7 for ; Mon, 1 May 2017 16:53:57 +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 0MGzWU-1dHrXv3E4Q-00Dqyt; Mon, 01 May 2017 18:48:33 +0200 Subject: [PATCH 3/4] drm/dp: Replace six seq_printf() calls by seq_puts() 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: <73f05228-be92-c2dd-b121-52bc211f236d@users.sourceforge.net> Date: Mon, 1 May 2017 18:48:32 +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:4vl90iWmk5OegFwfodjY26ZFqZ5+UVHqYNl5A1aZGCD2hZyBTId hgSeeYp0ld59jF3e5om7uqYXzrW4gWNVNsZrE6E98TRJVcKCvz88Qk+LJGnocIfplCm0LjL WCWE2cAXVinUPUxTgM2ScDrTBuRYUV4U2r8bUYQ/qE4w2nzq7I4Dr3JtqADoTRP7ERwPWCb 7jl0sQ+Dt4TVdhy9XNcwA== X-UI-Out-Filterresults: notjunk:1; V01:K0:oVwLwxXmIe0=:MVA6bH4M1noGAP4oHjxdwO pD5thbRhDxDyU3qhtATELUjVI4FE5jAJFQxA9kDsDFr7jEM2AglYJGN0qyzxU7GK9WMAQoQ8g XAM+ntQMuOnUNnsPyxC8UjBBdxmV64UgWmHeJSUIFIVlNoMnGabe6hWD9Ae7Rc6cSb0cP7viI wLQhndBUL/ZbjSWOUp3qGAIzcP7sPeMMtVB7WBvU2BHbqcaSjgxQmRu2fT3YlYxUel2rL7TyR FDhPNv7nBcY0Yw4rnkDlRbyGVw/Y91LPlwD2axSDtzMJtWIDYPu8fx1CpJFQEI9J7bwEC46im Scg/OPCXMTYHlJzdUVuzI9SBjvS+AoEWoFkXWhy2ury2Uo4D/siuCk72BtsjRsi6HeMg6x8/5 PL5q0zMxAiBhqE+jmp4njpmwqqX3W5KiWYQpjN+Hfb32q1AkfEzdpZWNczaFfP5i8LkS2+C2x 2ljvp0sAjFJmzLI5x1SBajkxSihGI0/rFHdqFba+FlEZM/uvR+3rFk4FeaJon6YCNnN0i9cPB EDvpWQrWgyM2H0qn+CgnRlb1+o8642s+Qe9ffS6wSW28/ODt1iYwu8cTidvSYmRVEjY/k+LNT F4/MwuXjzOVDxXqkHBC7ac4LgIAyxkyJETofpl9RMx/y78HtT0GglImN+iuhBkrFdnzR6nSsC wG5P52fmMgSFqmQj2HNimHpjwf9aMJSZCA3LHOkhRYK0LRimNeXt2jdek07i2IKpQ/r4/9c7/ BVnCEGThvOlc1sEb/KqonRv5wEYBVdcpWrTpwSD84CpHnm46oqh0jqLDX8jZ8VxmMtxbBr532 mW1Ub8Z 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:23:24 +0200 Strings which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 2ddcb3d2f65a..bcc76f15f1ce 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2837,27 +2837,27 @@ void drm_dp_mst_dump_topology(struct seq_file *m, bool bret; int ret; ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, buf, DP_RECEIVER_CAP_SIZE); - seq_printf(m, "dpcd: "); + seq_puts(m, "dpcd: "); for (i = 0; i < DP_RECEIVER_CAP_SIZE; i++) seq_printf(m, "%02x ", buf[i]); seq_putc(m, '\n'); ret = drm_dp_dpcd_read(mgr->aux, DP_FAUX_CAP, buf, 2); - seq_printf(m, "faux/mst: "); + seq_puts(m, "faux/mst: "); for (i = 0; i < 2; i++) seq_printf(m, "%02x ", buf[i]); seq_putc(m, '\n'); ret = drm_dp_dpcd_read(mgr->aux, DP_MSTM_CTRL, buf, 1); - seq_printf(m, "mst ctrl: "); + seq_puts(m, "mst ctrl: "); for (i = 0; i < 1; i++) seq_printf(m, "%02x ", buf[i]); 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); - seq_printf(m, "branch oui: "); + seq_puts(m, "branch oui: "); for (i = 0; i < 0x3; i++) seq_printf(m, "%02x", buf[i]); - seq_printf(m, " devid: "); + seq_puts(m, " devid: "); for (i = 0x3; i < 0x8 && buf[i]; i++) seq_printf(m, "%c", buf[i]); @@ -2865,7 +2865,7 @@ void drm_dp_mst_dump_topology(struct seq_file *m, 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: "); + seq_puts(m, "payload table: "); for (i = 0; i < 63; i++) seq_printf(m, "%02x ", buf[i]); seq_putc(m, '\n');