mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bas Peters <baspeters93@gmail.com>
To: gregkh@linuxgoundation.org, stern@rowland.harvard.edu
Cc: dan.j.williams@intel.com, hdegoede@redhat.com,
	sarah.a.sharp@linux.intel.com, peter.chen@freescale.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bas Peters <baspeters93@gmail.com>
Subject: [PATCH 2/6] drivers: usb: core: devio.c: fix whitespace errors thrown by checkpatch.pl
Date: Sat,  7 Feb 2015 22:55:02 +0100	[thread overview]
Message-ID: <1423346106-13493-3-git-send-email-baspeters93@gmail.com> (raw)
In-Reply-To: <1423346106-13493-1-git-send-email-baspeters93@gmail.com>

This patch fixes errors generated by checkpatch.pl relating to
whitespace issues.

Signed-off-by: Bas Peters <baspeters93@gmail.com>
---
 drivers/usb/core/devio.c | 61 ++++++++++++++++++++++++------------------------
 1 file changed, 31 insertions(+), 30 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index ea3c737..7c932d9 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -103,7 +103,7 @@ MODULE_PARM_DESC(usbfs_snoop, "true to log all usbfs traffic");
 #define snoop(dev, format, arg...)				\
 	do {							\
 		if (usbfs_snoop)				\
-			dev_info(dev , format , ## arg);	\
+			dev_info(dev, format, ## arg);		\
 	} while (0)
 
 enum snoop_when {
@@ -1320,7 +1320,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
 	is_in = (uurb->endpoint & USB_ENDPOINT_DIR_MASK) != 0;
 
 	u = 0;
-	switch(uurb->type) {
+	switch (uurb->type) {
 	case USBDEVFS_URB_TYPE_CONTROL:
 		if (!usb_endpoint_xfer_control(&ep->desc))
 			return -EINVAL;
@@ -1944,38 +1944,39 @@ static int proc_ioctl(struct usb_dev_state *ps, struct usbdevfs_ioctl *ctl)
 		retval = -EHOSTUNREACH;
 	else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno)))
 		retval = -EINVAL;
-	else switch (ctl->ioctl_code) {
-
-	/* disconnect kernel driver from interface */
-	case USBDEVFS_DISCONNECT:
-		if (intf->dev.driver) {
-			driver = to_usb_driver(intf->dev.driver);
-			dev_dbg(&intf->dev, "disconnect by usbfs\n");
-			usb_driver_release_interface(driver, intf);
-		} else
-			retval = -ENODATA;
-		break;
+	else
+		switch (ctl->ioctl_code) {
+
+		/* disconnect kernel driver from interface */
+		case USBDEVFS_DISCONNECT:
+			if (intf->dev.driver) {
+				driver = to_usb_driver(intf->dev.driver);
+				dev_dbg(&intf->dev, "disconnect by usbfs\n");
+				usb_driver_release_interface(driver, intf);
+			} else
+				retval = -ENODATA;
+			break;
 
-	/* let kernel drivers try to (re)bind to the interface */
-	case USBDEVFS_CONNECT:
-		if (!intf->dev.driver)
-			retval = device_attach(&intf->dev);
-		else
-			retval = -EBUSY;
-		break;
+		/* let kernel drivers try to (re)bind to the interface */
+		case USBDEVFS_CONNECT:
+			if (!intf->dev.driver)
+				retval = device_attach(&intf->dev);
+			else
+				retval = -EBUSY;
+			break;
 
-	/* talk directly to the interface's driver */
-	default:
-		if (intf->dev.driver)
-			driver = to_usb_driver(intf->dev.driver);
-		if (driver == NULL || driver->unlocked_ioctl == NULL) {
-			retval = -ENOTTY;
-		} else {
-			retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, buf);
-			if (retval == -ENOIOCTLCMD)
+		/* talk directly to the interface's driver */
+		default:
+			if (intf->dev.driver)
+				driver = to_usb_driver(intf->dev.driver);
+			if (driver == NULL || driver->unlocked_ioctl == NULL) {
 				retval = -ENOTTY;
+			} else {
+				retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, buf);
+				if (retval == -ENOIOCTLCMD)
+					retval = -ENOTTY;
+			}
 		}
-	}
 
 	/* cleanup and return */
 	if (retval >= 0
-- 
2.1.0


  parent reply	other threads:[~2015-02-07 21:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-07 21:55 [PATCH 0/6] drivers: usb: core: fix various checkpatch errors Bas Peters
2015-02-07 21:55 ` [PATCH 1/6] drivers: usb: core: devio.c: remove assignment of variables in if conditions Bas Peters
2015-02-09  2:15   ` Peter Chen
2015-02-09 10:05     ` Bas Peters
2015-02-07 21:55 ` Bas Peters [this message]
2015-02-07 21:55 ` [PATCH 3/6] drivers: usb: core: hcd.c: " Bas Peters
2015-02-08 11:15   ` Sergei Shtylyov
2015-02-09 10:10     ` Bas Peters
2015-02-07 21:55 ` [PATCH 4/6] drivers: usb: core: hub.c: remove NULL initialization of static variables Bas Peters
2015-02-08 11:17   ` Sergei Shtylyov
2015-02-07 21:55 ` [PATCH 5/6] drivers: usb: core: hub.c: remove assignment of variables in if conditions Bas Peters
2015-02-08 11:20   ` Sergei Shtylyov
2015-02-07 21:55 ` [PATCH 6/6] drivers: usb: core: endpoint.c: fix trivial whitespace issue Bas Peters

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423346106-13493-3-git-send-email-baspeters93@gmail.com \
    --to=baspeters93@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxgoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@freescale.com \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®