linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Fixed to checkpatch errors to usbtmc.c
@ 2016-12-06 12:57 Ozgur Karatas
  2016-12-07  8:25 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Ozgur Karatas @ 2016-12-06 12:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, dpenkler; +Cc: linux-usb, linux-kernel

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 <okaratas@member.fsf.org>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] Fixed to checkpatch errors to usbtmc.c
  2016-12-06 12:57 [PATCH 1/1] Fixed to checkpatch errors to usbtmc.c Ozgur Karatas
@ 2016-12-07  8:25 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2016-12-07  8:25 UTC (permalink / raw)
  To: Ozgur Karatas; +Cc: dpenkler, linux-usb, linux-kernel

On Tue, Dec 06, 2016 at 02:57:00PM +0200, Ozgur Karatas wrote:
> Hello all,

This isn't needed in a changelog text.

> 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

Please break this up into one patch per "type" of fix please.

> Regards,

This isn't needed either :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-07  8:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-06 12:57 [PATCH 1/1] Fixed to checkpatch errors to usbtmc.c Ozgur Karatas
2016-12-07  8:25 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).