All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: legacy: printer: Fixed space related coding style issues
@ 2016-01-19 14:33 Tapan Prakash T
  0 siblings, 0 replies; only message in thread
From: Tapan Prakash T @ 2016-01-19 14:33 UTC (permalink / raw)
  To: balbi; +Cc: linux-usb, linux-kernel, Tapan Prakash T

This patch fixes checkpatch.pl error and warning in the file printer.c
ERROR: space prohibited before open square bracket '['
WARNING: sizeof device_desc should be sizeof(device_desc)

Signed-off-by: Tapan Prakash T <tapanprakasht@gmail.com>
---
 drivers/usb/gadget/legacy/printer.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/gadget/legacy/printer.c b/drivers/usb/gadget/legacy/printer.c
index a22d30a..a605283 100644
--- a/drivers/usb/gadget/legacy/printer.c
+++ b/drivers/usb/gadget/legacy/printer.c
@@ -24,8 +24,8 @@ USB_GADGET_COMPOSITE_OPTIONS();
 #define DRIVER_DESC		"Printer Gadget"
 #define DRIVER_VERSION		"2015 FEB 17"
 
-static const char shortname [] = "printer";
-static const char driver_desc [] = DRIVER_DESC;
+static const char shortname[] = "printer";
+static const char driver_desc[] = DRIVER_DESC;
 
 #include "u_printer.h"
 
@@ -69,7 +69,7 @@ static struct usb_function *f_printer;
  */
 
 static struct usb_device_descriptor device_desc = {
-	.bLength =		sizeof device_desc,
+	.bLength =		sizeof(device_desc),
 	.bDescriptorType =	USB_DT_DEVICE,
 	.bcdUSB =		cpu_to_le16(0x0200),
 	.bDeviceClass =		USB_CLASS_PER_INTERFACE,
@@ -86,13 +86,13 @@ static const struct usb_descriptor_header *otg_desc[2];
 
 /* descriptors that are built on-demand */
 
-static char				product_desc [40] = DRIVER_DESC;
-static char				serial_num [40] = "1";
+static char				product_desc[40] = DRIVER_DESC;
+static char				serial_num[40] = "1";
 static char				pnp_string[PNP_STRING_LEN] =
 	"XXMFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;";
 
 /* static strings, in UTF-8 */
-static struct usb_string		strings [] = {
+static struct usb_string		strings[] = {
 	[USB_GADGET_MANUFACTURER_IDX].s = "",
 	[USB_GADGET_PRODUCT_IDX].s = product_desc,
 	[USB_GADGET_SERIAL_IDX].s =	serial_num,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-19 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 14:33 [PATCH] usb: gadget: legacy: printer: Fixed space related coding style issues Tapan Prakash T

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.