From patchwork Mon May 8 09:11:37 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: 9715907 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 EDB4260364 for ; Mon, 8 May 2017 09:11:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D18EC22B39 for ; Mon, 8 May 2017 09:11:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C60EB26E78; Mon, 8 May 2017 09:11:44 +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 7339922B39 for ; Mon, 8 May 2017 09:11:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B46D76E176; Mon, 8 May 2017 09:11:43 +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 C7A606E176 for ; Mon, 8 May 2017 09:11:41 +0000 (UTC) Received: from [192.168.1.3] ([77.182.37.117]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LiUKG-1dkINC07MS-00cfG1; Mon, 08 May 2017 11:11:38 +0200 Subject: [PATCH 1/4] dma-buf: Combine two function calls into one in dma_buf_debug_show() From: SF Markus Elfring To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org, Gustavo Padovan , Sumit Semwal References: <3d972fa2-787a-d1f2-ff86-5c05494e00d3@users.sourceforge.net> Message-ID: Date: Mon, 8 May 2017 11:11:37 +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: <3d972fa2-787a-d1f2-ff86-5c05494e00d3@users.sourceforge.net> Content-Language: en-US X-Provags-ID: V03:K0:DlEaAp2gMTPhiCQe/1Tkmh916yZr9H3LYkoCsSMYc023VfMQ9yX hGtc2k7yLqLiYa6QG9talcl6H5ESOR+QpaWU0I+wUA0MwxWkJYem46dzpoH9gUM5jY7Dprm mZLCs2f2emrKpWYbBAn6M1QtujA/OJssVaLDhpHvz3wp3EgVdued2BbgTA/mcsF6DiWXPIP vxkpGRlUME9LWvCNr2zYA== X-UI-Out-Filterresults: notjunk:1; V01:K0:0HGTlR7V7D0=:wIibCH69niOfslrfR22w4E OiQ0LCF3jweoSysZHqVp0NnuvpXgK/YllESzRaGJqFPaLOy+hCOgjz6mxEF5hwKVCZKCrhb8O b7DLCLbhURWn2DJuGsVDIC/pHw1UO0J0Tu3ZmcAB40PwL0kS+RHDlDAZP7MTf5SiRg02cn4+Z cuw0yRmY0H4Xm+hu6BbWmUkFGT5CzTTxvY35vUi+e0o3OI27uCkI/KYCu4K0M3Gg1WNZEr0wK wdh/Fa36nPTZsANrX0rfW3vo+06MJ41Y6N0F18QS2TA90+SCRHsuOECBvaVM4hy9iZM/r4lwD QlGJn3IJBQlTJlKLwfcsru55YlOZtff1XaZtiyYkR3gZaCmu+VuXHNQLJiOEwJrWYk3nWNlJ3 +95g/XkpGqqclN68JV54alPaCXbhDw80aZhII2oOyrl/5exaimJ3lYtDWm570BAclDEHxA1gG icRD+30hrz1p599aiWWMry9CasSu/4ppr6eLge3c6z+Aq22UoY1UxDT4gdlGf1C7wbgrTNCyR URZpiPURSBEnLabdZh5B8FRmslrXbaAteVk+4qHwDjRuNju7mq7qk3Un/hX8OmPmoc6GGEC5w rTgCCfEpXJ1hhf/zoACBINtJSBWzcZkullOAUy9GsWGBxLoHgHIZz5/rQwgo+mHfm3L1aKuVB /E7M5wbaarRTIq0W6KYARaIAkhOEyD4zdPw+2C1s/7eDBjqhReMq3Jm9GAm/JGX1ozzIhjgaL zsTTIjcviOl8iP7zxWghXGLIGzfc+EHoZKWrq/9g6XuCbsgloGn9YNIaABY/kYR2DSfgOhvtR QxGL4A8 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, 8 May 2017 10:32:44 +0200 A bit of data was put into a sequence by two separate function calls. Print the same data by a single function call instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Gustavo Padovan --- drivers/dma-buf/dma-buf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 512bdbc23bbb..53257c166f4d 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -1122,9 +1122,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused) attach_count = 0; list_for_each_entry(attach_obj, &buf_obj->attachments, node) { - seq_puts(s, "\t"); - - seq_printf(s, "%s\n", dev_name(attach_obj->dev)); + seq_printf(s, "\t%s\n", dev_name(attach_obj->dev)); attach_count++; }