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: 9715911 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 423C560364 for ; Mon, 8 May 2017 09:11:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26CB222638 for ; Mon, 8 May 2017 09:11:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B88A22BF1; Mon, 8 May 2017 09:11:58 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFBB322638 for ; Mon, 8 May 2017 09:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752909AbdEHJLq (ORCPT ); Mon, 8 May 2017 05:11:46 -0400 Received: from mout.web.de ([212.227.17.12]:51004 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751255AbdEHJLp (ORCPT ); Mon, 8 May 2017 05:11:45 -0400 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 Cc: LKML , kernel-janitors@vger.kernel.org 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 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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++; }