From: Ben Minerds <puzzleduck@gmail.com>
To: balbi@ti.com
Cc: puzzleduck@gmail.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] usb: gadget: Conform with checkpatch -3 warnings, 1 error
Date: Sun, 9 Sep 2012 10:50:35 +1000 [thread overview]
Message-ID: <1347151835-19028-1-git-send-email-puzzleduck@gmail.com> (raw)
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
next reply other threads:[~2012-09-09 0:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-09 0:50 Ben Minerds [this message]
2012-09-10 10:48 ` [PATCH] usb: gadget: Conform with checkpatch -3 warnings, 1 error Sebastian Andrzej Siewior
2012-09-10 13:21 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347151835-19028-1-git-send-email-puzzleduck@gmail.com \
--to=puzzleduck@gmail.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox