2012-05-18 19:15:33

by Jeffrin Jose

[permalink] [raw]
Subject: [PATCH 1/1]USB:storage:fixed space at the start of a line issues.

Fixed space at the start of a line issues found
by checkpatch.pl tool in drivers/usb/storage/usual-tables.c

Signed-off-by: Jeffrin Jose <[email protected]>
---
drivers/usb/storage/usual-tables.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/storage/usual-tables.c b/drivers/usb/storage/usual-tables.c
index b969279..f2301ee 100644
--- a/drivers/usb/storage/usual-tables.c
+++ b/drivers/usb/storage/usual-tables.c
@@ -34,17 +34,17 @@
vendorName, productName, useProtocol, useTransport, \
initFunction, flags) \
{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
- .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
+.driver_info = (flags)|(USB_US_TYPE_STOR<<24) }

#define COMPLIANT_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
vendorName, productName, useProtocol, useTransport, \
initFunction, flags) \
{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
- .driver_info = (flags) }
+.driver_info = (flags) }

#define USUAL_DEV(useProto, useTrans, useType) \
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
- .driver_info = ((useType)<<24) }
+.driver_info = ((useType)<<24) }

struct usb_device_id usb_storage_usb_ids[] = {
# include "unusual_devs.h"
--
1.7.10


2012-05-18 19:24:50

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/1]USB:storage:fixed space at the start of a line issues.

On Sat, May 19, 2012 at 12:48:35AM +0530, Jeffrin Jose wrote:
> Fixed space at the start of a line issues found
> by checkpatch.pl tool in drivers/usb/storage/usual-tables.c
>
> Signed-off-by: Jeffrin Jose <[email protected]>

Your subject is better, but now you forgot the spaces after the ':'
characters, what happened to them?

> ---
> drivers/usb/storage/usual-tables.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/storage/usual-tables.c b/drivers/usb/storage/usual-tables.c
> index b969279..f2301ee 100644
> --- a/drivers/usb/storage/usual-tables.c
> +++ b/drivers/usb/storage/usual-tables.c
> @@ -34,17 +34,17 @@
> vendorName, productName, useProtocol, useTransport, \
> initFunction, flags) \
> { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
> - .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
> +.driver_info = (flags)|(USB_US_TYPE_STOR<<24) }

That's dumb, and should not be changed, sorry.

checkpatch isn't always correct, please think when using it.

greg k-h

2012-05-19 13:48:54

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH 1/1]USB:storage:fixed space at the start of a line issues.

Hello.

On 18-05-2012 23:18, Jeffrin Jose wrote:

> Fixed space at the start of a line issues found
> by checkpatch.pl tool in drivers/usb/storage/usual-tables.c

> Signed-off-by: Jeffrin Jose<[email protected]>
> ---
> drivers/usb/storage/usual-tables.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

> diff --git a/drivers/usb/storage/usual-tables.c b/drivers/usb/storage/usual-tables.c
> index b969279..f2301ee 100644
> --- a/drivers/usb/storage/usual-tables.c
> +++ b/drivers/usb/storage/usual-tables.c
> @@ -34,17 +34,17 @@
> vendorName, productName, useProtocol, useTransport, \
> initFunction, flags) \
> { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
> - .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
> +.driver_info = (flags)|(USB_US_TYPE_STOR<<24) }

Spaces are usually replaced by tab. Without indentation this looks worse
than it was.

WBR, Sergei