usb: gadget: Conform with checkpatch -3 warnings, 1 error
PATCH 1/1 usb: gadget: Conform with checkpatch -3 warnings, 1 error
Removed 3 checkpatch.sh warnings and 1 error indrivers/usb/gadget/serial.c.
-sizeof brackets x2
-remove initialise to 0
-pr_warning to pr_warn
Signed-off-by Ben Minerds <[email protected]>
--- drivers/usb/gadget/serial.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
drivers/usb/gadget/serial.c +4 -5
@@ -101,9 +101,8 @@ static struct usb_device_descriptor device_desc = { };static struct usb_otg_descriptor otg_descriptor = { - .bLength =sizeof otg_descriptor, + .bLength =sizeof (otg_descriptor), .bDescriptorType =USB_DT_OTG , -/* REVISIT SRP-only hardware is possible, although * it would not be called "OTG" ... */
@@ -127,7 +126,7 @@ static bool use_acm = true;module_param (use_acm, bool,0 );MODULE_PARM_DESC (use_acm,"Use CDC ACM, default=yes" ); -static bool use_obex = false; +static bool use_obex;module_param (use_obex, bool,0 );MODULE_PARM_DESC (use_obex,"Use CDC OBEX, default=no" );
@@ -175,7 +174,7 @@ static int __init gs_bind(struct usb_composite_dev *cdev)*/ /* device description: manufacturer, product */ -snprintf (manufacturer,sizeof manufacturer,"%s %s with %s" , +snprintf (manufacturer,sizeof (manufacturer),"%s %s with %s" ,init_utsname ()->sysname,init_utsname ()->release, gadget->name); status =usb_string_id (cdev);
@@ -212,7 +211,7 @@ static int __init gs_bind(struct usb_composite_dev *cdev)* things like configuration and altsetting numbering * can need hardware-specific attention though. */ -pr_warning ("gs_bind: controller '%s' not recognized\n" , +pr_warn ("gs_bind: controller '%s' not recognized\n" , gadget->name); device_desc.bcdDevice =cpu_to_le16 (GS_VERSION_NUM |0x0099 );
Signature · 1 line
1.7.2.5
Review
Quoted 5 lines · Ben Minerds
Removed 3
checkpatch.shwarnings and 1 error indrivers/usb/gadget/serial.c.(quoted diff) +0
-3-sizeof brackets x2 -remove initialise to 0 -pr_warning to pr_warn
I have a series pending which removes the last two chunks.
Sebastian
Quoted 7 lines · Ben Minerds
Removed 3
checkpatch.shwarnings and 1 error indrivers/usb/gadget/serial.c.(quoted diff) +0
-3-sizeof brackets x2 -remove initialise to 0 -pr_warning to pr_warnSigned-off-by Ben Minerds <[email protected]>
please rebase this on my gadget branch ;-)
Signature · 1 line
balbi