[PATCH 6/8] staging/hv: remove typedef STORVSC_REQUEST_EXTENSION

Bill Pemberton wfp5p at virginia.edu
Fri Aug 7 19:52:19 UTC 2009


The STORVSC_REQUEST_EXTENSION typedef is removed.  The typedef it
defines is now named hv_storvsc_request_ext

Signed-off-by: Bill Pemberton <wfp5p at virginia.edu>
---
 drivers/staging/hv/BlkVsc.c  |    2 +-
 drivers/staging/hv/StorVsc.c |   35 +++++++++++++++++------------------
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index 8bc15b4..5d17877 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -55,7 +55,7 @@ BlkVscInitialize(
 	Driver->name = gBlkDriverName;
 	memcpy(&Driver->deviceType, &gBlkVscDeviceType, sizeof(GUID));
 
-	storDriver->RequestExtSize			= sizeof(STORVSC_REQUEST_EXTENSION);
+	storDriver->RequestExtSize = sizeof(struct hv_storvsc_request_ext);
 	/* Divide the ring buffer data size (which is 1 page less than the ring buffer size since that page is reserved for the ring buffer indices) */
 	/* by the max request size (which is VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + struct hv_vstor_packet + u64) */
 	storDriver->MaxOutstandingRequestsPerChannel =
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index c0cc66e..8614a0a 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -40,7 +40,7 @@
 /* Data types */
 
 
-typedef struct _STORVSC_REQUEST_EXTENSION {
+struct hv_storvsc_request_ext {
 	/* LIST_ENTRY						ListEntry; */
 
 	struct hv_storvsc_request *Request;
@@ -50,7 +50,7 @@ typedef struct _STORVSC_REQUEST_EXTENSION {
 	struct osd_waitevent *WaitEvent;
 
 	struct hv_vstor_packet VStorPacket;
-} STORVSC_REQUEST_EXTENSION;
+};
 
 
 /* A storvsc device is a device object that contains a vmbus channel */
@@ -74,9 +74,8 @@ typedef struct _STORVSC_DEVICE{
 	/* HANDLE						OutstandingRequestLock; */
 
 	/* Used for vsc/vsp channel reset process */
-	STORVSC_REQUEST_EXTENSION	InitRequest;
-
-	STORVSC_REQUEST_EXTENSION	ResetRequest;
+	struct hv_storvsc_request_ext InitRequest;
+	struct hv_storvsc_request_ext ResetRequest;
 
 } STORVSC_DEVICE;
 
@@ -130,14 +129,14 @@ static void
 StorVscOnIOCompletion(
 	struct hv_device *Device,
 	struct hv_vstor_packet *VStorPacket,
-	STORVSC_REQUEST_EXTENSION *RequestExt
+	struct hv_storvsc_request_ext *RequestExt
 	);
 
 static void
 StorVscOnReceive(
 	struct hv_device *Device,
 	struct hv_vstor_packet *VStorPacket,
-	STORVSC_REQUEST_EXTENSION *RequestExt
+	struct hv_storvsc_request_ext *RequestExt
 	);
 
 static int
@@ -263,8 +262,8 @@ StorVscInitialize(
 
 	DPRINT_ENTER(STORVSC);
 
-	DPRINT_DBG(STORVSC, "sizeof(STORVSC_REQUEST)=%zd sizeof(STORVSC_REQUEST_EXTENSION)=%zd sizeof(struct hv_vstor_packet)=%zd, sizeof(struct hv_vmscsi_request)=%zd",
-		sizeof(struct hv_storvsc_request), sizeof(STORVSC_REQUEST_EXTENSION), sizeof(struct hv_vstor_packet), sizeof(struct hv_vmscsi_request));
+	DPRINT_DBG(STORVSC, "sizeof(STORVSC_REQUEST)=%zd sizeof(struct hv_storvsc_request_ext)=%zd sizeof(struct hv_vstor_packet)=%zd, sizeof(struct hv_vmscsi_request)=%zd",
+		sizeof(struct hv_storvsc_request), sizeof(struct hv_storvsc_request_ext), sizeof(struct hv_vstor_packet), sizeof(struct hv_vmscsi_request));
 
 	/* Make sure we are at least 2 pages since 1 page is used for control */
 	ASSERT(storDriver->RingBufferSize >= (PAGE_SIZE << 1));
@@ -272,7 +271,7 @@ StorVscInitialize(
 	Driver->name = gDriverName;
 	memcpy(&Driver->deviceType, &gStorVscDeviceType, sizeof(GUID));
 
-	storDriver->RequestExtSize			= sizeof(STORVSC_REQUEST_EXTENSION);
+	storDriver->RequestExtSize = sizeof(struct hv_storvsc_request_ext);
 
 	/*
 	 * Divide the ring buffer data size (which is 1 page less
@@ -361,7 +360,7 @@ static int StorVscChannelInit(struct hv_device *Device)
 {
 	int ret=0;
 	STORVSC_DEVICE *storDevice;
-	STORVSC_REQUEST_EXTENSION *request;
+	struct hv_storvsc_request_ext *request;
 	struct hv_vstor_packet *vstorPacket;
 
 	storDevice = GetStorDevice(Device);
@@ -377,7 +376,7 @@ static int StorVscChannelInit(struct hv_device *Device)
 
 	/* Now, initiate the vsc/vsp initialization protocol on the open channel */
 
-	memset(request, sizeof(STORVSC_REQUEST_EXTENSION), 0);
+	memset(request, sizeof(*request), 0);
 	request->WaitEvent = osd_WaitEventCreate();
 
 	vstorPacket->Operation = VStorOperationBeginInitialization;
@@ -631,7 +630,7 @@ StorVscOnHostReset(
 	int ret=0;
 
 	STORVSC_DEVICE *storDevice;
-	STORVSC_REQUEST_EXTENSION *request;
+	struct hv_storvsc_request_ext *request;
 	struct hv_vstor_packet *vstorPacket;
 
 	DPRINT_ENTER(STORVSC);
@@ -700,7 +699,7 @@ StorVscOnIORequest(
 	)
 {
 	STORVSC_DEVICE *storDevice;
-	STORVSC_REQUEST_EXTENSION* requestExtension = (STORVSC_REQUEST_EXTENSION*) Request->Extension;
+	struct hv_storvsc_request_ext *requestExtension = (struct hv_storvsc_request_ext *) Request->Extension;
 	struct hv_vstor_packet *vstorPacket = &requestExtension->VStorPacket;
 	int ret=0;
 
@@ -811,7 +810,7 @@ static void
 StorVscOnIOCompletion(
 	struct hv_device *Device,
 	struct hv_vstor_packet *VStorPacket,
-	STORVSC_REQUEST_EXTENSION *RequestExt
+	struct hv_storvsc_request_ext *RequestExt
 	)
 {
 	struct hv_storvsc_request *request;
@@ -881,7 +880,7 @@ static void
 StorVscOnReceive(
 	struct hv_device *Device,
 	struct hv_vstor_packet *VStorPacket,
-	STORVSC_REQUEST_EXTENSION *RequestExt
+	struct hv_storvsc_request_ext *RequestExt
 	)
 {
 	switch(VStorPacket->Operation)
@@ -922,7 +921,7 @@ StorVscOnChannelCallback(
 	u32 bytesRecvd;
 	u64 requestId;
 	unsigned char packet[ALIGN_UP(sizeof(struct hv_vstor_packet),8)];
-	STORVSC_REQUEST_EXTENSION *request;
+	struct hv_storvsc_request_ext *request;
 
 	DPRINT_ENTER(STORVSC);
 
@@ -949,7 +948,7 @@ StorVscOnChannelCallback(
 
 			/* ASSERT(bytesRecvd == sizeof(struct hv_vstor_packet)); */
 
-			request = (STORVSC_REQUEST_EXTENSION*)(unsigned long)requestId;
+			request = (struct hv_storvsc_request_ext *)(unsigned long)requestId;
 			ASSERT(request);
 
 			/* if (vstorPacket.Flags & SYNTHETIC_FLAG) */
-- 
1.6.2.5




More information about the devel mailing list