From patchwork Thu May 4 16:51:06 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: 9712289 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 B836C60235 for ; Thu, 4 May 2017 16:51:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA01C2869F for ; Thu, 4 May 2017 16:51:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EBC5286BB; Thu, 4 May 2017 16:51:34 +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 2E71D286AD for ; Thu, 4 May 2017 16:51:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 32A666E1F8; Thu, 4 May 2017 16:51:30 +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.17.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6C926E1F8 for ; Thu, 4 May 2017 16:51:28 +0000 (UTC) Received: from [192.168.1.2] ([92.228.166.245]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MVLj0-1dZPK93Bl8-00YhOl; Thu, 04 May 2017 18:51:15 +0200 From: SF Markus Elfring Subject: [PATCH 1/9] drm/i915: Replace ten seq_puts() calls by seq_putc() To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Chris Wilson , Daniel Vetter , David Airlie , Jani Nikula References: <39c8a155-cf89-1aa5-9ca6-4e9ccf3aa602@users.sourceforge.net> Message-ID: <0d89f50f-8c32-1572-fad2-3c99e21bf0cd@users.sourceforge.net> Date: Thu, 4 May 2017 18:51:06 +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: <39c8a155-cf89-1aa5-9ca6-4e9ccf3aa602@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:2nM4z5VO6YNKXLgq4IZmJQN4iu7fCUeDEfHNc/LYT0TQrW/v4+e FR4fwaPJ8Lr3AgA5FFmGD5rJEIXj83RJJrBAxuFX8WreQ/U6wU4jWVn5iLIp3MTYIkxKebp 3SWGDNrj4tozvE+BeitVkTO8Nqq+oLEQVLGPbV+WZculvm+m8NoRLcImUoTYh8ece3zyLzT m1G28z1H6ohaQivbtyl3Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:jw42ToSq6Gs=:BWr1ZNw1jVUjBgT5Hp3nyb nqODXsrtv29DOI/k/ZHaFA699KbQrGjMBxl0J7Q2/4hWlve7jS+z5nfkQGPeMubNenAtjmz9W 894QAe3gxLvVXU9MulI6+FKnaeMX4SuhfTy5Y8oHfJj0chJwNf28i25Xj24jqpIhxzS9cYIy+ Z4XpXd/V+nE5LaiFzuoQzImIuOurq/SFjuZk0OqhB0QXKR/vs5IZ899aSiRegBNhfKIqOCvyk 5VJdEEyrB6i+hPTV2aFQs8ZoFXWH8ZW/gV+IS93O6VPIBDeBhPECj9a+KjOFNCpipQKnVrhNH 42iYLLG3Qw39PYPYs7BlKOH7MOCSpIZQ7B07SzZ0TZ/b8IOvd2vj3Z8dew7H8lHpRYqsNyx57 S4kYm5d/qFaz4xnlA1/49OsAFuNp3prMOxe7aDZDMe2SUeHxAdekSUoPpBhEy1KeCF4JgPLkk 7IJa4KMUqYGJ/qDEdnQ+nLxzhbLa+t+ulAjTDM4BfN10I1pP/V5cW4fZmOrgknseA+WTj7GI5 t2brcHm9ZLL7v3yOaDO0aX0JzWRzAH0Eowld8hWtD+HKXKRZ/tYDra/0jiZhojWokz+pGF7pP uHM4Qkzj8UVjxatKHSXVw1RXdlOk30gybX2SmpqtXsg7qIQI5S3wtAO2BijhzRM/xVPzj1O27 Zq1OJuBHHwm+ecX4ywlUsE7CeiIHaXyIpn2aLaU4roEVqZvnDSZcGa2WoIbMIq88FMBeUHndP CtUGQcx5yJ26jym01CzMHt0QUUohUrP5d+9w7p44RAGpCoJhIPOG90ahSpPKInB3SUXdNjiDp PUWTwKgx/2Ee5jfar5YxZpnvjAscA== 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: Thu, 4 May 2017 11:04:45 +0200 Some 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/gpu/drm/i915/i915_debugfs.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index d689e511744e..f2bda699749a 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -190,7 +190,7 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) seq_printf(m, " , fence: %d%s", vma->fence->id, i915_gem_active_isset(&vma->last_fence) ? "*" : ""); - seq_puts(m, ")"); + seq_putc(m, ')'); } if (obj->stolen) seq_printf(m, " (stolen: %08llx)", obj->stolen->start); @@ -2689,7 +2689,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data) (stat[pipe] == VLV_EDP_PSR_ACTIVE_SF_UPDATE)) seq_printf(m, " pipe %c", pipe_name(pipe)); } - seq_puts(m, "\n"); + seq_putc(m, '\n'); /* * VLV/CHV PSR has no kind of performance counter @@ -3176,7 +3176,7 @@ static void intel_scaler_info(struct seq_file *m, struct intel_crtc *intel_crtc) seq_printf(m, ", scalers[%d]: use=%s, mode=%x", i, yesno(sc->in_use), sc->mode); } - seq_puts(m, "\n"); + seq_putc(m, '\n'); } else { seq_puts(m, "\tNo scalers available on this platform\n"); } @@ -3384,8 +3384,7 @@ static int i915_engine_info(struct seq_file *m, void *unused) w->tsk->comm, w->tsk->pid, w->seqno); } spin_unlock_irq(&b->rb_lock); - - seq_puts(m, "\n"); + seq_putc(m, '\n'); } intel_runtime_pm_put(dev_priv); @@ -3629,7 +3628,7 @@ static void drrs_status_per_crtc(struct seq_file *m, /* DRRS not supported. Print the VBT parameter*/ seq_puts(m, "\tDRRS Supported : No"); } - seq_puts(m, "\n"); + seq_putc(m, '\n'); } static int i915_drrs_status(struct seq_file *m, void *unused) @@ -3764,12 +3763,11 @@ static int i915_displayport_test_active_show(struct seq_file *m, void *data) if (connector->status == connector_status_connected && connector->encoder != NULL) { intel_dp = enc_to_intel_dp(connector->encoder); - if (intel_dp->compliance.test_active) - seq_puts(m, "1"); - else - seq_puts(m, "0"); - } else - seq_puts(m, "0"); + seq_putc(m, + intel_dp->compliance.test_active ? '1' : '0'); + } else { + seq_putc(m, '0'); + } } drm_connector_list_iter_end(&conn_iter); @@ -3823,8 +3821,9 @@ static int i915_displayport_test_data_show(struct seq_file *m, void *data) seq_printf(m, "bpc: %u\n", intel_dp->compliance.test_data.bpc); } - } else - seq_puts(m, "0"); + } else { + seq_putc(m, '0'); + } } drm_connector_list_iter_end(&conn_iter); @@ -3864,8 +3863,9 @@ static int i915_displayport_test_type_show(struct seq_file *m, void *data) connector->encoder != NULL) { intel_dp = enc_to_intel_dp(connector->encoder); seq_printf(m, "%02lx", intel_dp->compliance.test_type); - } else - seq_puts(m, "0"); + } else { + seq_putc(m, '0'); + } } drm_connector_list_iter_end(&conn_iter);