From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>
Subject: [PATCH 5/8] Staging: hv: mousevsc: Fix checkpatch errors and warnings
Date: Tue, 19 Jul 2011 11:44:22 -0700 [thread overview]
Message-ID: <1311101065-23417-5-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1311101065-23417-1-git-send-email-kys@microsoft.com>
Fix checkpatch errors and warnings.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/staging/hv/hv_mouse.c | 58 +++++++++++++++++++++-------------------
1 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 28bd2c5..e95bd3a 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -53,7 +53,7 @@ struct hv_input_dev_info {
(SYNTHHID_INPUT_VERSION_MAJOR << 16))
-#pragma pack(push,1)
+#pragma pack(push, 1)
/*
* Message types in the synthetic input protocol
*/
@@ -119,8 +119,8 @@ struct synthhid_input_report {
#pragma pack(pop)
-#define INPUTVSC_SEND_RING_BUFFER_SIZE 10*PAGE_SIZE
-#define INPUTVSC_RECV_RING_BUFFER_SIZE 10*PAGE_SIZE
+#define INPUTVSC_SEND_RING_BUFFER_SIZE (10 * PAGE_SIZE)
+#define INPUTVSC_RECV_RING_BUFFER_SIZE (10 * PAGE_SIZE)
#define NBITS(x) (((x)/BITS_PER_LONG)+1)
@@ -177,7 +177,8 @@ struct mousevsc_dev {
static const char *driver_name = "mousevsc";
-static void deviceinfo_callback(struct hv_device *dev, struct hv_input_dev_info *info);
+static void deviceinfo_callback(struct hv_device *dev,
+ struct hv_input_dev_info *info);
static void inputreport_callback(struct hv_device *dev, void *packet, u32 len);
static void reportdesc_callback(struct hv_device *dev, void *packet, u32 len);
@@ -336,7 +337,8 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
input_device->hid_desc = kzalloc(desc->bLength, GFP_KERNEL);
if (!input_device->hid_desc) {
- pr_err("unable to allocate hid descriptor - size %d", desc->bLength);
+ pr_err("unable to allocate hid descriptor - size %d",
+ desc->bLength);
goto cleanup;
}
@@ -502,22 +504,21 @@ static void mousevsc_on_channel_callback(void *context)
desc = (struct vmpacket_descriptor *)buffer;
switch (desc->type) {
- case VM_PKT_COMP:
- mousevsc_on_send_completion(
- device, desc);
- break;
-
- case VM_PKT_DATA_INBAND:
- mousevsc_on_receive(
- device, desc);
- break;
-
- default:
- pr_err("unhandled packet type %d, tid %llx len %d\n",
- desc->type,
- req_id,
- bytes_recvd);
- break;
+ case VM_PKT_COMP:
+ mousevsc_on_send_completion(
+ device, desc);
+ break;
+
+ case VM_PKT_DATA_INBAND:
+ mousevsc_on_receive(
+ device, desc);
+ break;
+
+ default:
+ pr_err("unhandled packet type %d, tid %llx len %d\n",
+ desc->type, req_id,
+ bytes_recvd);
+ break;
}
/* reset */
@@ -596,12 +597,12 @@ static int mousevsc_connect_to_vsp(struct hv_device *device)
pr_info("synthhid protocol request...");
ret = vmbus_sendpacket(device->channel, request,
- sizeof(struct pipe_prt_msg) -
- sizeof(unsigned char) +
- sizeof(struct synthhid_protocol_request),
- (unsigned long)request,
- VM_PKT_DATA_INBAND,
- VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
+ sizeof(struct pipe_prt_msg) -
+ sizeof(unsigned char) +
+ sizeof(struct synthhid_protocol_request),
+ (unsigned long)request,
+ VM_PKT_DATA_INBAND,
+ VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) {
pr_err("unable to send synthhid protocol request.");
goto cleanup;
@@ -766,7 +767,8 @@ struct input_device_context {
};
-static void deviceinfo_callback(struct hv_device *dev, struct hv_input_dev_info *info)
+static void deviceinfo_callback(struct hv_device *dev,
+ struct hv_input_dev_info *info)
{
struct input_device_context *input_device_ctx =
dev_get_drvdata(&dev->device);
--
1.7.4.1
next prev parent reply other threads:[~2011-07-19 18:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 18:43 [PATCH 0/8] Staging: hv: Driver cleanup K. Y. Srinivasan
2011-07-19 18:44 ` [PATCH 1/8] Staging: hv: vmbus: Fix a checkpatch warning in ring_buffer.c K. Y. Srinivasan
2011-07-19 18:44 ` [PATCH 2/8] Staging: hv: vmbus: Fix checkpatch warnings in connection.c K. Y. Srinivasan
2011-07-19 18:44 ` [PATCH 3/8] Staging: hv: tools: Fix a checkpatch warning in hv_kvp_daemon.c K. Y. Srinivasan
2011-07-19 18:44 ` [PATCH 4/8] Staging: hv: vmbus: Fix checkpatch warnings K. Y. Srinivasan
2011-08-23 23:16 ` Greg KH
2011-08-24 1:10 ` KY Srinivasan
2011-07-19 18:44 ` K. Y. Srinivasan [this message]
2011-07-19 19:28 ` [PATCH 5/8] Staging: hv: mousevsc: Fix checkpatch errors and warnings Joe Perches
2011-07-19 22:46 ` KY Srinivasan
2011-07-19 18:44 ` [PATCH 6/8] Staging: hv: Get rid of checkpatch cleanup item K. Y. Srinivasan
2011-07-19 18:44 ` [PATCH 7/8] Staging: hv: Get rid of the vmbus merge item K. Y. Srinivasan
2011-07-19 18:44 ` [PATCH 8/8] Staging: hv: Update the TODO file K. Y. Srinivasan
2011-08-23 23:14 ` [PATCH 1/8] Staging: hv: vmbus: Fix a checkpatch warning in ring_buffer.c Greg KH
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=1311101065-23417-5-git-send-email-kys@microsoft.com \
--to=kys@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.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;
as well as URLs for NNTP newsgroup(s).