From patchwork Thu May 4 16:54:16 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: 9712337 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 6CF2A6020B for ; Thu, 4 May 2017 17:00:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EEC328404 for ; Thu, 4 May 2017 17:00:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53CBB2869C; Thu, 4 May 2017 17:00:22 +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=unavailable 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 E5A1628404 for ; Thu, 4 May 2017 17:00:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 43D3D6E54D; Thu, 4 May 2017 17:00:20 +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.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 32AD26E54C; Thu, 4 May 2017 17:00:18 +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 0Le4Lg-1drlAs39i8-00pwvk; Thu, 04 May 2017 18:54:18 +0200 Subject: [PATCH 3/9] drm/i915: Replace 14 seq_printf() calls by seq_puts() From: SF Markus Elfring 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: <56ab5065-5a24-47cf-023f-b10c6daf4799@users.sourceforge.net> Date: Thu, 4 May 2017 18:54:16 +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-US X-Provags-ID: V03:K0:hOIP4fatT6Qluc4z5aRMuvxWpvdX6cf9jFXQMnSaofkcCcv2gp1 HvPeADI6X+PCer9MkpRN6NQxJ7Zk9CUCmzBk9n8gh8xDWhFsVTZqAcGHB2e4lTo4C7Qb61X 8T3vW4661o4p6DNfgNO8+HWr73XLeL9scXEMGjy2tVUGf89orGoRvv2mUOh8Bnbjr/SuuTO tdpiSPlFzDNZzsrczk9uw== X-UI-Out-Filterresults: notjunk:1; V01:K0:CiuCMV4cWCQ=:Zf0wKonQ/BR9xJj67oWJar I94U2uqwfWgxX4hlcDKc/QxxoFnwYT/s43HPuGvaJKT4lw1Vu7AKUNxHzNIK7ToJIt4i/nJgt ELUZYEZ7KUpAqMWvuo9yurjxa2Mz2++e3daLfLrQcWTlkC+7hsQlQ1lIjusGjLwG1I1KlDa5s Mlg/kr119w2u7d/w6A9J2riJtdLKSVBztEozLogY3EuIW5DVNeQyArTtPt6YTaqGjZGFiz56i 7woD6MrK1hAY8LyfKdZwFRd93U4qp9jtQVcZ/zFATIQRfoPjihs9fuBidth8MsZpWIWajRtBX Qa9wAutmmJe2MjNQeS0c4vI8o9JSjfodPGk9QfawklWAKXiP3yMLehXOHdIgrhJ438hdbVU3W ArBU71tDHsE1tphkN7EQEEQf9QiJWGP74RsPNMrFmSAh04Zo2juHcklvod8mmBrSL/3WtZEyG Ey9dRoDWjrNolkdQLOgrIwGqvjYU0O0D1SFtpG71/enkZrbWZffpwADXZnwHqUqygzohHq7TU cf1x4fRu7VP/MQ7A+KmLVoQiaBGsUwovYpzD2Li0RxzfYIIQCUcYCIwighZwsNRgwFISr2L87 QCfPvCXPV95pE7umg3OOeqfXTBkBxPTjpK6sx/I/dVOl6VAYtNjaP0iJpefO8guBPid9hgT1Q yX/jLQWA4fye7BT45KO9Lwo6nlW8tYgdedhhBBj+QjDDe4tKfcn6L5VMc9kgg3LqtRlYNtdZk c+ybkd5P7dCvPzVKxNXixyDyllt7E0nUTPDiNwGL8HY8wpDen+Xd/xAnVees/iR/1ZXoAt9GC OeCU2KArNQ3NGni37goDlkpyLkkPQ== 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 13:20:47 +0200 Some 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/i915/i915_debugfs.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 4adf96be9146..296108464f2b 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -149,7 +149,7 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) } seq_printf(m, " (pinned x %d)", pin_count); if (obj->pin_display) - seq_printf(m, " (display)"); + seq_puts(m, " (display)"); list_for_each_entry(vma, &obj->vma_list, obj_link) { if (!drm_mm_node_allocated(&vma->node)) continue; @@ -581,8 +581,10 @@ static int i915_gem_pageflip_info(struct seq_file *m, void *data) intel_engine_last_submit(engine), intel_engine_get_seqno(engine), i915_gem_request_completed(work->flip_queued_req)); - } else - seq_printf(m, "Flip not associated with any ring\n"); + } else { + seq_puts(m, + "Flip not associated with any ring\n"); + } seq_printf(m, "Flip queued on frame %d, (was ready on frame %d), now %d\n", work->flip_queued_vblank, work->flip_ready_vblank, @@ -2048,7 +2050,7 @@ static int i915_dump_lrc(struct seq_file *m, void *unused) int ret; if (!i915.enable_execlists) { - seq_printf(m, "Logical Ring Contexts are disabled\n"); + seq_puts(m, "Logical Ring Contexts are disabled\n"); return 0; } @@ -2402,7 +2404,7 @@ static int i915_guc_load_status_info(struct seq_file *m, void *data) if (!HAS_GUC_UCODE(dev_priv)) return 0; - seq_printf(m, "GuC firmware status:\n"); + seq_puts(m, "GuC firmware status:\n"); seq_printf(m, "\tpath: %s\n", guc_fw->path); seq_printf(m, "\tfetch: %s\n", @@ -2510,7 +2512,7 @@ static int i915_guc_info(struct seq_file *m, void *data) return 0; } - seq_printf(m, "Doorbell map:\n"); + seq_puts(m, "Doorbell map:\n"); seq_printf(m, "\t%*pb\n", GUC_NUM_DOORBELLS, guc->doorbell_bitmap); seq_printf(m, "Doorbell next cacheline: 0x%x\n\n", guc->db_cacheline); @@ -2521,7 +2523,7 @@ static int i915_guc_info(struct seq_file *m, void *data) seq_printf(m, "GuC last action error code: %d\n", guc->action_err); total = 0; - seq_printf(m, "\nGuC submissions:\n"); + seq_puts(m, "\nGuC submissions:\n"); for_each_engine(engine, dev_priv, id) { u64 submissions = guc->submissions[id]; total += submissions; @@ -2795,7 +2797,7 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused) seq_printf(m, "Usage count: %d\n", atomic_read(&dev_priv->drm.dev->power.usage_count)); #else - seq_printf(m, "Device Power Management (CONFIG_PM) disabled\n"); + seq_puts(m, "Device Power Management (CONFIG_PM) disabled\n"); #endif seq_printf(m, "PCI device power state: %s [%d]\n", pci_power_name(pdev->current_state), @@ -2914,7 +2916,7 @@ static void intel_encoder_info(struct seq_file *m, drm_get_connector_status_name(connector->status)); if (connector->status == connector_status_connected) { struct drm_display_mode *mode = &crtc->mode; - seq_printf(m, ", mode:\n"); + seq_puts(m, ", mode:\n"); intel_seq_print_mode(m, 2, mode); } else { seq_putc(m, '\n'); @@ -2945,7 +2947,7 @@ static void intel_panel_info(struct seq_file *m, struct intel_panel *panel) { struct drm_display_mode *mode = panel->fixed_mode; - seq_printf(m, "\tfixed mode:\n"); + seq_puts(m, "\tfixed mode:\n"); intel_seq_print_mode(m, 2, mode); } @@ -3038,7 +3040,7 @@ static void intel_connector_info(struct seq_file *m, break; } - seq_printf(m, "\tmodes:\n"); + seq_puts(m, "\tmodes:\n"); list_for_each_entry(mode, &connector->modes, head) intel_seq_print_mode(m, 2, mode); } @@ -3266,9 +3268,7 @@ static int i915_engine_info(struct seq_file *m, void *unused) engine->timeline->inflight_seqnos); rcu_read_lock(); - - seq_printf(m, "\tRequests:\n"); - + seq_puts(m, "\tRequests:\n"); rq = list_first_entry(&engine->timeline->requests, struct drm_i915_gem_request, link); if (&rq->link != &engine->timeline->requests) @@ -3346,7 +3346,7 @@ static int i915_engine_info(struct seq_file *m, void *unused) engine->execlist_port[0].count); print_request(m, rq, "rq: "); } else { - seq_printf(m, "\t\tELSP[0] idle\n"); + seq_puts(m, "\t\tELSP[0] idle\n"); } rq = READ_ONCE(engine->execlist_port[1].request); if (rq) { @@ -3354,7 +3354,7 @@ static int i915_engine_info(struct seq_file *m, void *unused) engine->execlist_port[1].count); print_request(m, rq, "rq: "); } else { - seq_printf(m, "\t\tELSP[1] idle\n"); + seq_puts(m, "\t\tELSP[1] idle\n"); } rcu_read_unlock(); @@ -3465,7 +3465,7 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused) seq_printf(m, "DPLL%i: %s, id: %i\n", i, pll->name, pll->id); seq_printf(m, " crtc_mask: 0x%08x, active: 0x%x, on: %s\n", pll->state.crtc_mask, pll->active_mask, yesno(pll->on)); - seq_printf(m, " tracked hardware state:\n"); + seq_puts(m, " tracked hardware state:\n"); seq_printf(m, " dpll: 0x%08x\n", pll->state.hw_state.dpll); seq_printf(m, " dpll_md: 0x%08x\n", pll->state.hw_state.dpll_md);