linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: Conform with checkpatch -3 warnings, 1 error
@ 2012-09-09  0:50 Ben Minerds
  2012-09-10 10:48 ` Sebastian Andrzej Siewior
  2012-09-10 13:21 ` Felipe Balbi
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Minerds @ 2012-09-09  0:50 UTC (permalink / raw)
  To: balbi; +Cc: puzzleduck, gregkh, linux-usb, linux-kernel

Removed 3 checkpatch.sh warnings and 1 error in
drivers/usb/gadget/serial.c.
-sizeof brackets x2
-remove initialise to 0
-pr_warning to pr_warn

Signed-off-by: Ben Minerds <puzzleduck@gmail.com>
---
 drivers/usb/gadget/serial.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 665c074..af69cd2 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -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);
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: gadget: Conform with checkpatch -3 warnings, 1 error
  2012-09-09  0:50 [PATCH] usb: gadget: Conform with checkpatch -3 warnings, 1 error Ben Minerds
@ 2012-09-10 10:48 ` Sebastian Andrzej Siewior
  2012-09-10 13:21 ` Felipe Balbi
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-09-10 10:48 UTC (permalink / raw)
  To: Ben Minerds; +Cc: balbi, gregkh, linux-usb, linux-kernel

On Sun, Sep 09, 2012 at 10:50:35AM +1000, Ben Minerds wrote:
> Removed 3 checkpatch.sh warnings and 1 error in
> drivers/usb/gadget/serial.c.
> -sizeof brackets x2
> -remove initialise to 0
> -pr_warning to pr_warn

I have a series pending which removes the last two chunks.

Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: gadget: Conform with checkpatch -3 warnings, 1 error
  2012-09-09  0:50 [PATCH] usb: gadget: Conform with checkpatch -3 warnings, 1 error Ben Minerds
  2012-09-10 10:48 ` Sebastian Andrzej Siewior
@ 2012-09-10 13:21 ` Felipe Balbi
  1 sibling, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2012-09-10 13:21 UTC (permalink / raw)
  To: Ben Minerds; +Cc: balbi, gregkh, linux-usb, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 338 bytes --]

On Sun, Sep 09, 2012 at 10:50:35AM +1000, Ben Minerds wrote:
> Removed 3 checkpatch.sh warnings and 1 error in
> drivers/usb/gadget/serial.c.
> -sizeof brackets x2
> -remove initialise to 0
> -pr_warning to pr_warn
> 
> Signed-off-by: Ben Minerds <puzzleduck@gmail.com>

please rebase this on my gadget branch ;-)

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-10 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-09  0:50 [PATCH] usb: gadget: Conform with checkpatch -3 warnings, 1 error Ben Minerds
2012-09-10 10:48 ` Sebastian Andrzej Siewior
2012-09-10 13:21 ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).