Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932561AbbBGV7b (ORCPT ); Sat, 7 Feb 2015 16:59:31 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:55574 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932423AbbBGV56 (ORCPT ); Sat, 7 Feb 2015 16:57:58 -0500 From: Bas Peters 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 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 Message-Id: <1423346106-13493-3-git-send-email-baspeters93@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1423346106-13493-1-git-send-email-baspeters93@gmail.com> References: <1423346106-13493-1-git-send-email-baspeters93@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3273 Lines: 106 This patch fixes errors generated by checkpatch.pl relating to whitespace issues. Signed-off-by: Bas Peters --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/