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
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Subject: [PATCH 06/16] Staging: hv: Get rid of dead code in storvsc.c
Date: Wed, 23 Mar 2011 10:50:24 -0700	[thread overview]
Message-ID: <1300902635-1347-6-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>

Get rid of some "dead code" from storvsc.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
 drivers/staging/hv/storvsc.c |   33 ---------------------------------
 1 files changed, 0 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index c8d7ff7..1f05aa6 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -65,7 +65,6 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device)
 
 static inline void free_stor_device(struct storvsc_device *device)
 {
-	/* ASSERT(atomic_read(&device->ref_count) == 0); */
 	kfree(device);
 }
 
@@ -103,10 +102,8 @@ static inline void put_stor_device(struct hv_device *device)
 	struct storvsc_device *stor_device;
 
 	stor_device = (struct storvsc_device *)device->ext;
-	/* ASSERT(stor_device); */
 
 	atomic_dec(&stor_device->ref_count);
-	/* ASSERT(atomic_read(&stor_device->ref_count)); */
 }
 
 /* Drop ref count to 1 to effectively disable get_stor_device() */
@@ -116,7 +113,6 @@ static inline struct storvsc_device *release_stor_device(
 	struct storvsc_device *stor_device;
 
 	stor_device = (struct storvsc_device *)device->ext;
-	/* ASSERT(stor_device); */
 
 	/* Busy wait until the ref drop to 2, then set it to 1 */
 	while (atomic_cmpxchg(&stor_device->ref_count, 2, 1) != 2)
@@ -132,7 +128,6 @@ static inline struct storvsc_device *final_release_stor_device(
 	struct storvsc_device *stor_device;
 
 	stor_device = (struct storvsc_device *)device->ext;
-	/* ASSERT(stor_device); */
 
 	/* Busy wait until the ref drop to 1, then set it to 0 */
 	while (atomic_cmpxchg(&stor_device->ref_count, 1, 0) != 1)
@@ -341,12 +336,8 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
 		   "completed bytes xfer %u", request_ext,
 		   vstor_packet->vm_srb.data_transfer_length);
 
-	/* ASSERT(request_ext != NULL); */
-	/* ASSERT(request_ext->request != NULL); */
-
 	request = request_ext->request;
 
-	/* ASSERT(request->OnIOCompletion != NULL); */
 
 	/* Copy over the status...etc */
 	request->status = vstor_packet->vm_srb.scsi_status;
@@ -366,8 +357,6 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
 				    "valid - len %d\n", request_ext,
 				    vstor_packet->vm_srb.sense_info_length);
 
-			/* ASSERT(vstor_packet->vm_srb.sense_info_length <= */
-			/* 	request->SenseBufferSize); */
 			memcpy(request->sense_buffer,
 			       vstor_packet->vm_srb.sense_data,
 			       vstor_packet->vm_srb.sense_info_length);
@@ -418,7 +407,6 @@ static void stor_vsc_on_channel_callback(void *context)
 	struct storvsc_request_extension *request;
 	int ret;
 
-	/* ASSERT(device); */
 
 	stor_device = must_get_stor_device(device);
 	if (!stor_device) {
@@ -435,21 +423,12 @@ static void stor_vsc_on_channel_callback(void *context)
 			DPRINT_DBG(STORVSC, "receive %d bytes - tid %llx",
 				   bytes_recvd, request_id);
 
-			/* ASSERT(bytes_recvd ==
-					sizeof(struct vstor_packet)); */
 
 			request = (struct storvsc_request_extension *)
 					(unsigned long)request_id;
-			/* ASSERT(request);c */
 
-			/* if (vstor_packet.Flags & SYNTHETIC_FLAG) */
 			if ((request == &stor_device->init_request) ||
 			    (request == &stor_device->reset_request)) {
-				/* DPRINT_INFO(STORVSC,
-				 *             "reset completion - operation "
-				 *             "%u status %u",
-				 *             vstor_packet.Operation,
-				 *             vstor_packet.Status); */
 
 				memcpy(&request->vstor_packet, packet,
 				       sizeof(struct vstor_packet));
@@ -461,7 +440,6 @@ static void stor_vsc_on_channel_callback(void *context)
 						request);
 			}
 		} else {
-			/* DPRINT_DBG(STORVSC, "nothing else to read..."); */
 			break;
 		}
 	} while (1);
@@ -508,7 +486,6 @@ int stor_vsc_on_device_add(struct hv_device *device,
 					void *additional_info)
 {
 	struct storvsc_device *stor_device;
-	/* struct vmstorage_channel_properties *props; */
 	struct storvsc_device_info *device_info;
 	int ret = 0;
 
@@ -520,8 +497,6 @@ int stor_vsc_on_device_add(struct hv_device *device,
 	}
 
 	/* Save the channel properties to our storvsc channel */
-	/* props = (struct vmstorage_channel_properties *)
-	 *		channel->offerMsg.Offer.u.Standard.UserDefined; */
 
 	/* FIXME: */
 	/*
@@ -530,15 +505,10 @@ int stor_vsc_on_device_add(struct hv_device *device,
 	 * scsi channel prior to the bus scan
 	 */
 
-	/* storChannel->PortNumber = 0;
-	storChannel->PathId = props->PathId;
-	storChannel->TargetId = props->TargetId; */
-
 	stor_device->port_number = device_info->port_number;
 	/* Send it back up */
 	ret = stor_vsc_connect_to_vsp(device);
 
-	/* device_info->PortNumber = stor_device->PortNumber; */
 	device_info->path_id = stor_device->path_id;
 	device_info->target_id = stor_device->target_id;
 
@@ -673,8 +643,6 @@ int stor_vsc_on_io_request(struct hv_device *device,
 		return -2;
 	}
 
-	/* print_hex_dump_bytes("", DUMP_PREFIX_NONE, request->Cdb,
-	 *			request->CdbLen); */
 
 	request_extension->request = request;
 	request_extension->device  = device;
@@ -762,7 +730,6 @@ int stor_vsc_initialize(struct hv_driver *driver)
 		   sizeof(struct vmscsi_request));
 
 	/* Make sure we are at least 2 pages since 1 page is used for control */
-	/* ASSERT(stor_driver->RingBufferSize >= (PAGE_SIZE << 1)); */
 
 	driver->name = g_driver_name;
 	memcpy(&driver->dev_type, &gStorVscDeviceType,
-- 
1.7.4.1

  parent reply	other threads:[~2011-03-23 17:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 17:48 [PATCH 00/16] Staging: hv: Cleanup storage drivers - Phase I K. Y. Srinivasan
2011-03-23 17:50 ` [PATCH 01/16] Staging: hv: Add the inclusion guard for vstorage.h K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 02/16] Staging: hv: Move the definition of struct storvsc_request_extension K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 03/16] Staging: hv: Move the definition of struct storvsc_device K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 04/16] Staging: hv: Cleanup " K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 05/16] Staging: hv: Get rid of the include of storvsc.c from blkvsc.c K. Y. Srinivasan
2011-03-23 17:50   ` K. Y. Srinivasan [this message]
2011-03-23 17:50   ` [PATCH 07/16] Staging: hv: Move the definition of stor_vsc_initialize() K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 08/16] Staging: hv: Make the function stor_vsc_initialize() static K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 09/16] Staging: hv: Cleanup the initialization of storvsc driver K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 10/16] Staging: hv: Move the contents of blkvsc.c to blkvsc_drv.c K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 11/16] Staging: hv: Get rid of the file blkvsc.c K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 12/16] Staging: hv: Cleanup initialization of blkvsc driver K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 13/16] Staging: hv: Move the definition of the function get_stor_device() K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 14/16] Staging: hv: Move the definition of the function put_stor_device() K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 15/16] Staging: hv: Move the definition of the function stor_vsc_on_host_reset() K. Y. Srinivasan
2011-03-23 17:50   ` [PATCH 16/16] Staging: hv: Make the function stor_vsc_on_host_reset() static K. Y. Srinivasan
2011-04-05  4:28   ` [PATCH 01/16] Staging: hv: Add the inclusion guard for vstorage.h Greg KH
2011-04-05  4:29     ` 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=1300902635-1347-6-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