Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965289AbeALVXD (ORCPT + 1 other); Fri, 12 Jan 2018 16:23:03 -0500 Received: from mout.web.de ([212.227.15.3]:61767 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965098AbeALVXC (ORCPT ); Fri, 12 Jan 2018 16:23:02 -0500 To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , Alex Xie , =?UTF-8?Q?Christian_K=c3=b6nig?= , Chunming Zhou , David Airlie , Junwei Zhang , =?UTF-8?Q?Michel_D=c3=a4nzer?= , =?UTF-8?Q?Nicolai_H=c3=a4hnle?= , Yong Zhao From: SF Markus Elfring Subject: [PATCH] drm/amdgpu: Use seq_putc() in two functions Cc: LKML , kernel-janitors@vger.kernel.org Message-ID: Date: Fri, 12 Jan 2018 22:22:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:uiyWM1/Id26/0bdm0JsaNx3cUsskEKuwPD/TVspuxnj+Ws+b74+ UZpmCZNkIxgWRa+tx2bkokcrxoGba79OnIl/hH7VUfOA6hmUPGvk/bz8IJJzWw0ohkuU+SP 8f0uNGMTmKIpS/8PY63aA0nWgzm1jr6Y6lymFH9fO85xU3l+Df0lupZdJUxVyO1JrIkvUWd oOkGp3RoWjuCQg8v90OLQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:65C6BYxu7fU=:efN16Qxd8yffhFohsj8dHc TPuAZ2UK1x+l1EUPFOTEM25RRTmTISNxw56GdspA155XUa0aw8+xkymsfqQQ/AkdTcCJAjLH2 iZ1ajjsf0b4bazcEchuQziqiIKJr2LIiBHdUtFp6Psps/aRf0CZwBP2awk3MxfYoXg+OdpJLu ynTeFyvAremXQL+4opEyKVex9MqFQp29Kxi1OtyrPgpIUotamvXkaDVHM2ZHrRueJdd1I4RKl OV8re+cmy2XF0tWOWgBAidAcVMCwgtrWoOwUhsuN8zP29rWL+g2yC2d/tx+vTBFMYa5HBqA5Y 03eoWcdLwaywXrzUJr06cwvllbZq5pU5dmuxx+cc+h8nK0DtUni2jlMvtoR1JnlyCemT43k9n +ufsmT9rb5xLRF4V1dRje+SgPKZ4mjYBFSmTpVR3Ool2JCWVgRkgkQ2IooDDrxD5XTU2EKOEP 9GC8MoZquc3JuVTk/nqusKBtZWfZzfA6LfQVWPXDu9bk0mSGTCzV9bqHbJppGsVOOJxq7Xxkx vKwC1vPmBgIpt0P1PmaDXn/u8Cbn8Dq3TTEb7BvMGjlxyEEX+Umw95Lih+9A93lk54Rrahmf0 6aN8fNGLzjRFZe6jBEmJglH6pXBFwg4lShVV5repD5H+Ow4ihU793ioiuPg9Fvx2wH+MKWdwA 1l6UsIwB2L2Dt4lgs9zSdhpWSJwIxIBLeRG7UY+TnCqyfl+sKCunbrykC3dsquD8D/H+yA1ey vwCPpIzpgm3HzTOwgNGWLOo5T8HnYOv5ZSwC9anmBOG5pzkjJm2eqik/8EM4q2L90lVqsXOLW umy5IDoy2kX3iwmeHZc3nU3lFT12MhwLucLBWz1AP3jU9v5L2A= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Fri, 12 Jan 2018 22:08:50 +0100 A few 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/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 10805edcf964..7ac233f5abe2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -806,8 +806,8 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) pin_count = READ_ONCE(bo->pin_count); if (pin_count) seq_printf(m, " pin count %d", pin_count); - seq_printf(m, "\n"); + seq_putc(m, '\n'); return 0; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c index 3144400435b7..57ce42d960ae 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c @@ -419,11 +419,8 @@ void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager, list_for_each_entry(i, &sa_manager->olist, olist) { uint64_t soffset = i->soffset + sa_manager->gpu_addr; uint64_t eoffset = i->eoffset + sa_manager->gpu_addr; - if (&i->olist == sa_manager->hole) { - seq_printf(m, ">"); - } else { - seq_printf(m, " "); - } + + seq_putc(m, (&i->olist == sa_manager->hole) ? '>' : ' '); seq_printf(m, "[0x%010llx 0x%010llx] size %8lld", soffset, eoffset, eoffset - soffset); @@ -431,7 +428,7 @@ void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager, seq_printf(m, " protected by 0x%08x on context %llu", i->fence->seqno, i->fence->context); - seq_printf(m, "\n"); + seq_putc(m, '\n'); } spin_unlock(&sa_manager->wq.lock); } -- 2.15.1