From patchwork Mon Apr 24 20:22:07 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: 9697155 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 8419C601E9 for ; Mon, 24 Apr 2017 20:22:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7904520265 for ; Mon, 24 Apr 2017 20:22:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D0F226223; Mon, 24 Apr 2017 20:22:33 +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=ham 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 284AD20265 for ; Mon, 24 Apr 2017 20:22:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1174345AbdDXUWb (ORCPT ); Mon, 24 Apr 2017 16:22:31 -0400 Received: from mout.web.de ([212.227.17.12]:54217 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1174336AbdDXUWa (ORCPT ); Mon, 24 Apr 2017 16:22:30 -0400 Received: from [192.168.1.2] ([77.181.233.174]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LdF0f-1cLCT22Fxh-00iUu2; Mon, 24 Apr 2017 22:22:10 +0200 Subject: [PATCH 6/7] HID: debug: Combine two seq_printf() calls into one call in hid_dump_device() From: SF Markus Elfring To: linux-iio@vger.kernel.org, linux-input@vger.kernel.org, Benjamin Tissoires , =?UTF-8?Q?Bruno_Pr=c3=a9mont?= , Henrik Rydberg , Jiri Kosina , Jonathan Cameron , Srinivas Pandruvada Cc: LKML , kernel-janitors@vger.kernel.org References: <2d526d72-a740-367b-04a9-ed698435f8ed@users.sourceforge.net> Message-ID: <0364de83-2ff2-3309-ec38-1e4db66d8231@users.sourceforge.net> Date: Mon, 24 Apr 2017 22:22:07 +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: <2d526d72-a740-367b-04a9-ed698435f8ed@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:z0+rtrbAOShNVVOuz3FjMuxjQrXVMywCcDAG1IEf9OKJgH0l7Ul C2YOH9t2m38gBEdd69prm/z/pEmX4QmvCVEKTbozHVshOK/Fafw3UPOSn6QXIJoUQZfltzv C+M9XGzyaQUMNXaiVXpmVdNw5wugI0O3bkSM0XauUTW+bKXmaNfQhoB9khq3ffeeAzFvOfg cdRkFiDHAAaD0iWSgJHfA== X-UI-Out-Filterresults: notjunk:1; V01:K0:iOIXxCr6qMo=:NRJjXHgFJRUjdUuKPYhPXp cwiPq34vHDKTzY18V7JNSAubUcEYq4++8GndjPC/mVUj7zkZ0uYxbte6VQew8xfV/+PHbIj6v lHH1xqxUcFB4mqwkidPfIUgCDT/RshMpVOAwON721NPgDmx3peWVdOzcg8fdICkPM18SdHoDJ +x/0iqUsdatf5hBkesNr2EXYKq59nLHlLvwYbVbPIDExJv4mZr/GrfeWCbPjM1JzDNFJc7pNH 2tOKEaJhmyJEWkyv5wONeAEPltm0qA1WyGo5QdZWWbOo+NdGIuTKnYywUTQrluExoFU+H8z0x ElsH9uluPsfwTxAIbo7jIY9Eqy7rRFChH7wE4UDtgyfbSRMX3moOZM2qcBfTSsowkrpQ8MDMz FUG9n8NdB39s0kcJl4EbmLkNAjqaGIH/KQQNN687CBaq3M0Pr7/utygI/PULKLJ59ZFZIKTFN dEcMvvmqVTZk2umrTZiVwyythDkRMI6y0h8pENfh1dvvotHv9j5v3UHrpfmNBw4QgUvX23BDu JvZBMpU0SV4WZey8B5I3hVszE9CToP+zcn9Z6k/kX/DxHSlMOxflSM35ITHNb/AfKhI7oGsh7 jgCBcJBBfCgiikHTmN1vv/z/g6ex7qH1gMXcALLdjx2Rehc3Yz1ivDjjGT1Yiq8Zbyj9OVBR+ YFcF58nslaA05yLHxUJ1kCRF6/C9Y3pBu28E3ULTCXyAHWBQHcPit93+xPIspql4ckHmpBJ6J GqnN/KbTDsqdhs8yT4otTHweGmuV7u6jjvVmIEABzvMSYRrhhrkdr0U5qGWd5KzR/Jz9gyfB5 iA+6TjV Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Mon, 24 Apr 2017 21:07:52 +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 --- drivers/hid/hid-debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index ce850f80d9e3..1e8ac6e569a2 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -646,8 +646,7 @@ void hid_dump_device(struct hid_device *device, struct seq_file *f) seq_printf(f, "%s", table[i]); if (report->id) seq_printf(f, "(%d)", report->id); - seq_printf(f, "[%s]", table[report->type]); - seq_printf(f, "\n"); + seq_printf(f, "[%s]\n", table[report->type]); for (k = 0; k < report->maxfield; k++) { tab(4, f); seq_printf(f, "Field(%d)\n", k);