From patchwork Mon Apr 24 20:21: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: 9697151 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 7633A601E9 for ; Mon, 24 Apr 2017 20:21:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68DFD283F9 for ; Mon, 24 Apr 2017 20:21:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BC7D2841C; Mon, 24 Apr 2017 20:21:30 +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 EE4D1283F9 for ; Mon, 24 Apr 2017 20:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1174182AbdDXUV2 (ORCPT ); Mon, 24 Apr 2017 16:21:28 -0400 Received: from mout.web.de ([217.72.192.78]:62160 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1174307AbdDXUV0 (ORCPT ); Mon, 24 Apr 2017 16:21:26 -0400 Received: from [192.168.1.2] ([77.181.233.174]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MJCSM-1czzKG3bdS-002ltg; Mon, 24 Apr 2017 22:21:19 +0200 Subject: [PATCH 5/7] HID: debug: Replace 12 seq_printf() calls by seq_puts() 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: Date: Mon, 24 Apr 2017 22:21: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: <2d526d72-a740-367b-04a9-ed698435f8ed@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:tcbAeVxnEJDvufBp5mo8CCMkO70i/635JpI4Wpsr1uOTPgsUIPk nDLWq9m6yKOAw1Z0Xcml+sx7EcmLAsDIJbzUiEUZLpvjegyssTssROyzcRfeM0mKxMFFb31 CDsNtH2yNgsFrGplpfqHm9M1V3YFHmjJ03OYyEBs37V9+IJSpXu0CpV6Rc5Jf6v0ruAWaIk YBFCIB5j0vqHAcK6fozKg== X-UI-Out-Filterresults: notjunk:1; V01:K0:e0z0x1rsKmA=:HEclo/h8yFnkGCGBycRbxX 9dKxj6bvkxEQW6ZCs3JyRb9eS5hDTHqLKGgv1g3gKtV0CoAh70N9cMXsQ4J/UinXXIBYqyVE5 2AQ8sMvOkC/EC+zGd21hMsLXqgN5UW1ghn6v3mfWdVO/T78EW75J96o+Crx3ugQu8IQ/MTmaJ fIWsI+yblnplBy8t0JE7RG79UQVbwd2v7zwlmzmCujHUO2z+dWIDauPgVSH8Ve4traMuYWUO+ jmTYTMtZ32fVWmKRDIiLXye4j28JVjwGJYOvQRt5TSi6zV0u6NnOdb/bSfWLBS/OT1NcGnIth E6Z1sH1Oh1irLJIRi2VSkoxAFRpQlNvHM6TPesRS5CpeU3VBQh9aT1VkJJxxRrexSUPNUqgXF CH1Uc7WnLuRlnHZySbvD7/0QpyhIjgHPw5LYEiImH5a+aYWYCJkVCaH0/+3pCe7CeVEeRgc0l QReoj11I5ooIgWR7eM+jHEqfb1liwGaLTgVwnHAQqLlMoJDdNdyilKvWU8iJWV2Wsp8wfKwfF 7IkDNKY6Be3JedTT5MdALgQ28zUMA/HE4+0fzuJaHcEbJlGUJlQu0YKa42huY1kHHfhX4ykgh b+0q542hwQML9r2OlHiyHB8f6jDyfJhMDzuR4VRYOicRuHDcHbhfiszP22H5Tz+hccLhs4TH+ qCS6gmg7F6JYZVNKBvAnOu+7vLPylaPID5w3MpUXkIkV3j4wnsEBYihpxqudCEAfcGP7AiB75 XPxMwVDqpnxahMdU5eJMdFwBOBjjpTXZIM08JO21UA3F3qICJjuUBc51a4DHVA0z7rvklNolo wpzps9a 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 20:55:27 +0200 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/hid/hid-debug.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index d47d5085bc99..ce850f80d9e3 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -535,18 +535,18 @@ void hid_dump_field(struct hid_field *field, int n, struct seq_file *f) { if (field->physical) { tab(n, f); - seq_printf(f, "Physical("); - hid_resolv_usage(field->physical, f); seq_printf(f, ")\n"); + seq_puts(f, "Physical("); + hid_resolv_usage(field->physical, f); seq_puts(f, ")\n"); } if (field->logical) { tab(n, f); - seq_printf(f, "Logical("); - hid_resolv_usage(field->logical, f); seq_printf(f, ")\n"); + seq_puts(f, "Logical("); + hid_resolv_usage(field->logical, f); seq_puts(f, ")\n"); } if (field->application) { tab(n, f); - seq_printf(f, "Application("); - hid_resolv_usage(field->application, f); seq_printf(f, ")\n"); + seq_puts(f, "Application("); + hid_resolv_usage(field->application, f); seq_puts(f, ")\n"); } tab(n, f); seq_printf(f, "Usage(%d)\n", field->maxusage); for (j = 0; j < field->maxusage; j++) { @@ -583,7 +583,7 @@ void hid_dump_field(struct hid_field *field, int n, struct seq_file *f) { data >>= 4; if(sys > 4) { - tab(n, f); seq_printf(f, "Unit(Invalid)\n"); + tab(n, f); seq_puts(f, "Unit(Invalid)\n"); } else { int earlier_unit = 0; @@ -607,14 +607,14 @@ void hid_dump_field(struct hid_field *field, int n, struct seq_file *f) { } } } - seq_printf(f, ")\n"); + seq_puts(f, ")\n"); } } tab(n, f); seq_printf(f, "Report Size(%u)\n", field->report_size); tab(n, f); seq_printf(f, "Report Count(%u)\n", field->report_count); tab(n, f); seq_printf(f, "Report Offset(%u)\n", field->report_offset); - tab(n, f); seq_printf(f, "Flags( "); + tab(n, f); seq_puts(f, "Flags( "); j = field->flags; seq_printf(f, "%s", HID_MAIN_ITEM_CONSTANT & j ? "Constant " : ""); seq_printf(f, "%s", HID_MAIN_ITEM_VARIABLE & j ? "Variable " : "Array "); @@ -625,7 +625,7 @@ void hid_dump_field(struct hid_field *field, int n, struct seq_file *f) { seq_printf(f, "%s", HID_MAIN_ITEM_NULL_STATE & j ? "NullState " : ""); seq_printf(f, "%s", HID_MAIN_ITEM_VOLATILE & j ? "Volatile " : ""); seq_printf(f, "%s", HID_MAIN_ITEM_BUFFERED_BYTE & j ? "BufferedByte " : ""); - seq_printf(f, ")\n"); + seq_puts(f, ")\n"); } EXPORT_SYMBOL_GPL(hid_dump_field); @@ -1038,5 +1038,5 @@ static void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f) for ( j = 0; j < report->field[i]->maxusage; j++) { usage = report->field[i]->usage + j; hid_resolv_usage(usage->hid, f); - seq_printf(f, " ---> "); + seq_puts(f, " ---> "); hid_resolv_event(usage->type, usage->code, f); @@ -1063,7 +1063,7 @@ static int hid_debug_rdesc_show(struct seq_file *f, void *p) /* dump HID report descriptor */ for (i = 0; i < rsize; i++) seq_printf(f, "%02x ", rdesc[i]); - seq_printf(f, "\n\n"); + seq_puts(f, "\n\n"); /* dump parsed data and input mappings */ hid_dump_device(hdev, f);