Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752184AbcLFM5F (ORCPT ); Tue, 6 Dec 2016 07:57:05 -0500 Received: from forward4o.cmail.yandex.net ([37.9.109.248]:38057 "EHLO forward4o.cmail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbcLFM5E (ORCPT ); Tue, 6 Dec 2016 07:57:04 -0500 Authentication-Results: mxback15h.mail.yandex.net; dkim=pass header.i=@yandex.com.tr From: Ozgur Karatas Envelope-From: mueddib@yandex.com.tr To: Greg Kroah-Hartman , dpenkler@gmail.com Cc: linux-usb@vger.kernel.org, linux-kernel Subject: [PATCH 1/1] Fixed to checkpatch errors to usbtmc.c MIME-Version: 1.0 Message-Id: <5008461481029020@web6h.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 06 Dec 2016 14:57:00 +0200 Content-Transfer-Encoding: 7bit Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3077 Lines: 72 Hello all, I will solve a checkpatch.pl script errors. drivers/usb/class/usbtmc.c:719: ERROR: else should follow close brace '}' drivers/usb/class/usbtmc.c:735: ERROR: space required after that ',' (ctx:VxV) drivers/usb/class/usbtmc.c:735: ERROR: space required after that ',' (ctx:VxV) drivers/usb/class/usbtmc.c:735: ERROR: space required after that ',' (ctx:VxV) drivers/usb/class/usbtmc.c:746: ERROR: else should follow close brace '}' drivers/usb/class/usbtmc.c:752: ERROR: space required after that ',' (ctx:VxV) drivers/usb/class/usbtmc.c:752: ERROR: space required after that ',' (ctx:VxV) drivers/usb/class/usbtmc.c:1403: ERROR: space required before the open parenthesis '(' total: 8 errors, 25 warnings, 1558 lines checked Regards, Signed-off-by: Ozgur Karatas --- drivers/usb/class/usbtmc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index a6c1fae..3b29871 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -715,8 +715,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf, /* Remove padding if it exists */ if (actual > remaining) actual = remaining; - } - else { + } else { if (this_part > n_characters) this_part = n_characters; /* Remove padding if it exists */ @@ -732,7 +731,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf, if ((buffer[8] & 0x01) && (actual >= n_characters)) remaining = 0; - dev_dbg(dev, "Bulk-IN header: remaining(%zu), buf(%p), buffer(%p) done(%zu)\n", remaining,buf,buffer,done); + dev_dbg(dev, "Bulk-IN header: remaining(%zu), buf(%p), buffer(%p) done(%zu)\n", remaining, buf, buffer, done); /* Copy buffer to user space */ @@ -742,14 +741,13 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf, goto exit; } done += actual; - } - else { + } else { if (actual > remaining) actual = remaining; remaining -= actual; - dev_dbg(dev, "Bulk-IN header cont: actual(%u), done(%zu), remaining(%zu), buf(%p), buffer(%p)\n", actual, done, remaining,buf,buffer); + dev_dbg(dev, "Bulk-IN header cont: actual(%u), done(%zu), remaining(%zu), buf(%p), buffer(%p)\n", actual, done, remaining, buf, buffer); /* Copy buffer to user space */ if (copy_to_user(buf + done, buffer, actual)) { @@ -1400,7 +1398,7 @@ static int usbtmc_probe(struct usb_interface *intf, dev_dbg(&intf->dev, "Trying to find if device Vendor 0x%04X Product 0x%04X has the RIGOL quirk\n", le16_to_cpu(data->usb_dev->descriptor.idVendor), le16_to_cpu(data->usb_dev->descriptor.idProduct)); - for(n = 0; usbtmc_id_quirk[n].idVendor > 0; n++) { + for (n = 0; usbtmc_id_quirk[n].idVendor > 0; n++) { if ((usbtmc_id_quirk[n].idVendor == le16_to_cpu(data->usb_dev->descriptor.idVendor)) && (usbtmc_id_quirk[n].idProduct == le16_to_cpu(data->usb_dev->descriptor.idProduct))) { dev_dbg(&intf->dev, "Setting this device as having the RIGOL quirk\n"); -- 2.1.4