Linux virtualization list
 help / color / mirror / Atom feed
From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@suse.de, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, virtualization@lists.osdl.org,
	ohering@suse.com, jbottomley@parallels.com, hch@infradead.org,
	linux-scsi@vger.kernel.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 01/15] Staging: hv: storvsc: Cleanup some comments
Date: Thu, 12 Jan 2012 12:37:54 -0800	[thread overview]
Message-ID: <1326400688-13544-1-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1326400637-13494-1-git-send-email-kys@microsoft.com>

Use consistent format for comments and get rid of some unnecessary
comments.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/staging/hv/storvsc_drv.c |   57 +++++++++++++++++--------------------
 1 files changed, 26 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index eb853f7..1633b03 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -50,8 +50,10 @@ static int storvsc_ringbuffer_size = STORVSC_RING_BUFFER_SIZE;
 module_param(storvsc_ringbuffer_size, int, S_IRUGO);
 MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)");
 
-/* to alert the user that structure sizes may be mismatched even though the */
-/* protocol versions match. */
+/*
+ * To alert the user that structure sizes may be mismatched even though the
+ * protocol versions match.
+ */
 
 
 #define REVISION_STRING(REVISION_) #REVISION_
@@ -68,26 +70,36 @@ MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)");
 		}							\
 	} while (0)
 
-/* Major/minor macros.  Minor version is in LSB, meaning that earlier flat */
-/* version numbers will be interpreted as "0.x" (i.e., 1 becomes 0.1). */
+/*
+ * Major/minor macros.  Minor version is in LSB, meaning that earlier flat
+ * version numbers will be interpreted as "0.x" (i.e., 1 becomes 0.1).
+ */
+
 #define VMSTOR_PROTOCOL_MAJOR(VERSION_)		(((VERSION_) >> 8) & 0xff)
 #define VMSTOR_PROTOCOL_MINOR(VERSION_)		(((VERSION_))      & 0xff)
 #define VMSTOR_PROTOCOL_VERSION(MAJOR_, MINOR_)	((((MAJOR_) & 0xff) << 8) | \
 						 (((MINOR_) & 0xff)))
 #define VMSTOR_INVALID_PROTOCOL_VERSION		(-1)
 
-/* Version history: */
-/* V1 Beta                    0.1 */
-/* V1 RC < 2008/1/31          1.0 */
-/* V1 RC > 2008/1/31          2.0 */
+/*
+ * Version history:
+ * V1 Beta: 0.1
+ * V1 RC < 2008/1/31: 1.0
+ * V1 RC > 2008/1/31:  2.0
+ * Win7: 4.2
+ */
+
 #define VMSTOR_PROTOCOL_VERSION_CURRENT VMSTOR_PROTOCOL_VERSION(4, 2)
 
 
 
 
-/*  This will get replaced with the max transfer length that is possible on */
-/*  the host adapter. */
-/*  The max transfer length will be published when we offer a vmbus channel. */
+/*
+ * This will get replaced with the max transfer length that is possible on
+ * the host adapter.
+ * The max transfer length will be published when we offer a vmbus channel.
+ */
+
 #define MAX_TRANSFER_LENGTH	0x40000
 #define DEFAULT_PACKET_SIZE (sizeof(struct vmdata_gpa_direct) +	\
 			sizeof(struct vstor_packet) +		\
@@ -211,18 +223,19 @@ struct vstor_packet {
 	};
 } __packed;
 
-/* Packet flags */
 /*
+ * Packet Flags:
+ *
  * This flag indicates that the server should send back a completion for this
  * packet.
  */
+
 #define REQUEST_COMPLETION_FLAG	0x1
 
 /*  This is the set of flags that the vsc can set in any packets it sends */
 #define VSC_LEGAL_FLAGS		(REQUEST_COMPLETION_FLAG)
 
 
-/* Defines */
 
 #define STORVSC_MAX_IO_REQUESTS				128
 
@@ -674,7 +687,6 @@ static int storvsc_connect_to_vsp(struct hv_device *device, u32 ring_size)
 
 	memset(&props, 0, sizeof(struct vmstorage_channel_properties));
 
-	/* Open the channel */
 	ret = vmbus_open(device->channel,
 			 ring_size,
 			 ring_size,
@@ -1154,9 +1166,6 @@ static int storvsc_host_reset(struct hv_device *device)
 }
 
 
-/*
- * storvsc_host_reset_handler - Reset the scsi HBA
- */
 static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
 {
 	struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
@@ -1166,9 +1175,6 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
 }
 
 
-/*
- * storvsc_command_completion - Command completion processing
- */
 static void storvsc_command_completion(struct hv_storvsc_request *request)
 {
 	struct storvsc_cmd_request *cmd_request =
@@ -1262,9 +1268,6 @@ static bool storvsc_check_scsi_cmd(struct scsi_cmnd *scmnd)
 	return allowed;
 }
 
-/*
- * storvsc_queuecommand - Initiate command processing
- */
 static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
 {
 	int ret;
@@ -1407,7 +1410,6 @@ retry_request:
 	return ret;
 }
 
-/* Scsi driver */
 static struct scsi_host_template scsi_driver = {
 	.module	=		THIS_MODULE,
 	.name =			"storvsc_host_t",
@@ -1448,11 +1450,6 @@ static const struct hv_vmbus_device_id id_table[] = {
 
 MODULE_DEVICE_TABLE(vmbus, id_table);
 
-
-/*
- * storvsc_probe - Add a new device for this driver
- */
-
 static int storvsc_probe(struct hv_device *device,
 			const struct hv_vmbus_device_id *dev_id)
 {
@@ -1542,8 +1539,6 @@ err_out0:
 	return ret;
 }
 
-/* The one and only one */
-
 static struct hv_driver storvsc_drv = {
 	.name = KBUILD_MODNAME,
 	.id_table = id_table,
-- 
1.7.4.1

  reply	other threads:[~2012-01-12 20:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 20:37 [PATCH 0000/0015] Staging: hv: storvsc cleanup K. Y. Srinivasan
2012-01-12 20:37 ` K. Y. Srinivasan [this message]
2012-01-12 20:37   ` [PATCH 02/15] Staging: hv: storvsc: Cleanup storvsc_probe() K. Y. Srinivasan
2012-01-12 20:37   ` [PATCH 03/15] Staging: hv: storvsc: Cleanup storvsc_queuecommand() K. Y. Srinivasan
2012-01-12 20:37   ` [PATCH 04/15] Staging: hv: storvsc: Introduce defines for srb status codes K. Y. Srinivasan
2012-01-12 20:37   ` [PATCH 05/15] Staging:hv: storvsc: Cleanup storvsc_host_reset_handler() K. Y. Srinivasan
2012-01-12 20:37   ` [PATCH 06/15] Staging: hv: storvsc: Move and cleanup storvsc_remove() K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 07/15] Staging: hv: storvsc: Add a comment to explain life-cycle management K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 08/15] Staging: hv: storvsc: Get rid of the on_io_completion in hv_storvsc_request K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 09/15] Staging: hv: storvsc: Rename the context field " K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 10/15] Staging: hv: storvsc: Miscellaneous cleanup of storvsc driver K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 11/15] Staging: hv: storvsc: Cleanup the code for generating protocol version K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 12/15] Staging: hv: storvsc: Cleanup some protocol related constants K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 13/15] Staging: hv: storvsc: Get rid of some unused defines K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 14/15] Staging: hv: storvsc: Consolidate the request structure K. Y. Srinivasan
2012-01-12 20:38   ` [PATCH 15/15] Staging: hv: storvsc: Consolidate all the wire protocol definitions K. Y. Srinivasan

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=1326400688-13544-1-git-send-email-kys@microsoft.com \
    --to=kys@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=hch@infradead.org \
    --cc=jbottomley@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ohering@suse.com \
    --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