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>,
Abhishek Kane <v-abkane@microsoft.com>
Subject: [PATCH 02/25] Staging: hv: Get rid of the references to the priv element of struct hv_driver in block driver
Date: Tue, 26 Apr 2011 09:20:19 -0700 [thread overview]
Message-ID: <1303834842-5022-2-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1303834842-5022-1-git-send-email-kys@microsoft.com>
In preparation for getting rid of the priv element from struct hv_driver,
get rid of the references to the priv element of struct hv_driver
in blkvsc_drv.c and storvsc.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/blkvsc_drv.c | 14 +++-----------
drivers/staging/hv/storvsc.c | 2 +-
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index acc5435..ec6a761 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -214,10 +214,8 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req,
{
struct block_device_context *blkdev = blkvsc_req->dev;
struct hv_device *device_ctx = blkdev->device_ctx;
- struct hv_driver *drv =
- drv_to_hv_drv(device_ctx->device.driver);
struct storvsc_driver_object *storvsc_drv_obj =
- drv->priv;
+ drv_to_stordrv(device_ctx->device.driver);
struct hv_storvsc_request *storvsc_req;
struct vmscsi_request *vm_srb;
int ret;
@@ -541,10 +539,8 @@ out:
*/
static int blkvsc_remove(struct device *device)
{
- struct hv_driver *drv =
- drv_to_hv_drv(device->driver);
struct storvsc_driver_object *storvsc_drv_obj =
- drv->priv;
+ drv_to_stordrv(device->driver);
struct hv_device *device_obj = device_to_hv_device(device);
struct block_device_context *blkdev = dev_get_drvdata(device);
unsigned long flags;
@@ -881,8 +877,6 @@ static int blkvsc_drv_init(void)
storvsc_drv_obj->ring_buffer_size = blkvsc_ringbuffer_size;
- drv->priv = storvsc_drv_obj;
-
/* Callback to client driver to complete the initialization */
blk_vsc_initialize(&storvsc_drv_obj->base);
@@ -945,10 +939,8 @@ static void blkvsc_drv_exit(void)
*/
static int blkvsc_probe(struct device *device)
{
- struct hv_driver *drv =
- drv_to_hv_drv(device->driver);
struct storvsc_driver_object *storvsc_drv_obj =
- drv->priv;
+ drv_to_stordrv(device->driver);
struct hv_device *device_obj = device_to_hv_device(device);
struct block_device_context *blkdev = NULL;
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 85bae5a..d53aa97 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -414,7 +414,7 @@ static int stor_vsc_connect_to_vsp(struct hv_device *device)
struct storvsc_driver_object *stor_driver;
int ret;
- stor_driver = (struct storvsc_driver_object *)device->drv;
+ stor_driver = drv_to_stordrv(device->device.driver);
memset(&props, 0, sizeof(struct vmstorage_channel_properties));
/* Open the channel */
--
1.7.4.1
WARNING: multiple messages have this Message-ID (diff)
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>,
Abhishek Kane <v-abkane@microsoft.com>,
Hank Janssen <hjanssen@microsoft.com>
Subject: [PATCH 02/25] Staging: hv: Get rid of the references to the priv element of struct hv_driver in block driver
Date: Tue, 26 Apr 2011 09:20:19 -0700 [thread overview]
Message-ID: <1303834842-5022-2-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1303834842-5022-1-git-send-email-kys@microsoft.com>
In preparation for getting rid of the priv element from struct hv_driver,
get rid of the references to the priv element of struct hv_driver
in blkvsc_drv.c and storvsc.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/blkvsc_drv.c | 14 +++-----------
drivers/staging/hv/storvsc.c | 2 +-
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index acc5435..ec6a761 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -214,10 +214,8 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req,
{
struct block_device_context *blkdev = blkvsc_req->dev;
struct hv_device *device_ctx = blkdev->device_ctx;
- struct hv_driver *drv =
- drv_to_hv_drv(device_ctx->device.driver);
struct storvsc_driver_object *storvsc_drv_obj =
- drv->priv;
+ drv_to_stordrv(device_ctx->device.driver);
struct hv_storvsc_request *storvsc_req;
struct vmscsi_request *vm_srb;
int ret;
@@ -541,10 +539,8 @@ out:
*/
static int blkvsc_remove(struct device *device)
{
- struct hv_driver *drv =
- drv_to_hv_drv(device->driver);
struct storvsc_driver_object *storvsc_drv_obj =
- drv->priv;
+ drv_to_stordrv(device->driver);
struct hv_device *device_obj = device_to_hv_device(device);
struct block_device_context *blkdev = dev_get_drvdata(device);
unsigned long flags;
@@ -881,8 +877,6 @@ static int blkvsc_drv_init(void)
storvsc_drv_obj->ring_buffer_size = blkvsc_ringbuffer_size;
- drv->priv = storvsc_drv_obj;
-
/* Callback to client driver to complete the initialization */
blk_vsc_initialize(&storvsc_drv_obj->base);
@@ -945,10 +939,8 @@ static void blkvsc_drv_exit(void)
*/
static int blkvsc_probe(struct device *device)
{
- struct hv_driver *drv =
- drv_to_hv_drv(device->driver);
struct storvsc_driver_object *storvsc_drv_obj =
- drv->priv;
+ drv_to_stordrv(device->driver);
struct hv_device *device_obj = device_to_hv_device(device);
struct block_device_context *blkdev = NULL;
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 85bae5a..d53aa97 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -414,7 +414,7 @@ static int stor_vsc_connect_to_vsp(struct hv_device *device)
struct storvsc_driver_object *stor_driver;
int ret;
- stor_driver = (struct storvsc_driver_object *)device->drv;
+ stor_driver = drv_to_stordrv(device->device.driver);
memset(&props, 0, sizeof(struct vmstorage_channel_properties));
/* Open the channel */
--
1.7.4.1
next prev parent reply other threads:[~2011-04-26 16:20 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 16:19 [PATCH 00/25] Staging: hv: Cleanup vmbus driver code K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 01/25] Staging: hv: Introduce a function to map a generic driver pointer to a pointer to storvsc_driver_object K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan [this message]
2011-04-26 16:20 ` [PATCH 02/25] Staging: hv: Get rid of the references to the priv element of struct hv_driver in block driver K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 03/25] Staging: hv: Get rid of the references to the priv element of struct hv_driver in hv_mouse.c K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 04/25] Staging: hv: Introduce a function to map a generic driver pointer to a pointer to struct netvsc_driver K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 05/25] Staging: hv: Get rid of the references to the priv element of struct hv_driver in net driver K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 06/25] Staging: hv: Get rid of the references to the priv element of struct hv_driver in storvsc_drv.c K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 07/25] Staging: hv: Cleanup vmbus_match() K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 08/25] Staging: hv: vmbus_driver cannot be unloaded; cleanup accordingly K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 22:45 ` Greg KH
2011-04-26 22:45 ` Greg KH
2011-04-27 2:31 ` KY Srinivasan
2011-04-27 4:55 ` uabuntsu
2011-04-27 4:55 ` uabuntsu
2011-04-28 0:20 ` Greg KH
2011-04-29 13:49 ` KY Srinivasan
2011-04-29 15:10 ` Greg KH
2011-04-29 17:40 ` KY Srinivasan
2011-04-29 22:02 ` KY Srinivasan
2011-04-29 23:14 ` Greg KH
2011-04-29 23:22 ` KY Srinivasan
2011-04-26 16:20 ` [PATCH 09/25] Staging: hv: Get rid of vmbus_release_unattached_channels() as it is not used K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 10/25] Staging: hv: Get rid of the priv pointer in struct hv_driver K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 11/25] Staging: hv: Get rid of the drv field in struct hv_device K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 22:56 ` Greg KH
2011-04-27 1:55 ` KY Srinivasan
2011-04-27 1:55 ` KY Srinivasan
2011-04-26 16:20 ` [PATCH 12/25] Staging: hv: Cleanup error handling in vmbus_child_device_register() K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 22:50 ` Greg KH
2011-04-27 2:11 ` KY Srinivasan
2011-04-28 0:25 ` Greg KH
2011-04-29 15:45 ` KY Srinivasan
2011-04-26 16:20 ` [PATCH 13/25] Staging: hv: Cleanup vmbus_probe() function K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 14/25] Staging: hv: Properly handle errors in hv_pci_probe() K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 15/25] Staging: hv: Make hv_pci_dev a static variable K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 16/25] Staging: hv: Make msg_dpc a global variable K. Y. Srinivasan
2011-04-26 22:43 ` Greg KH
2011-04-26 16:20 ` [PATCH 17/25] Staging: hv: Make event_dpc " K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 22:43 ` Greg KH
2011-04-26 22:43 ` Greg KH
2011-04-26 16:20 ` [PATCH 18/25] Staging: hv: Get rid of struct hv_bus K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 19:40 ` Greg KH
2011-04-26 20:23 ` KY Srinivasan
2011-04-26 20:58 ` Greg KH
2011-04-26 20:58 ` Greg KH
2011-04-26 22:12 ` KY Srinivasan
2011-04-26 16:20 ` [PATCH 19/25] Staging: hv: Add probe function to struct hv_driver K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 20/25] Staging: hv: Use the probe function in " K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:51 ` Christoph Hellwig
2011-04-26 16:20 ` [PATCH 21/25] Staging: hv: Add remove() function to " K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 22/25] Staging: hv: Use the remove() function in " K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 23/25] Staging: hv: Add shutdown() function to " K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 24/25] Staging: hv: Use the shutdown() function in " K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:20 ` [PATCH 25/25] Staging: hv: VMBUS is a acpi enumerated device; get irq value from bios K. Y. Srinivasan
2011-04-26 16:20 ` K. Y. Srinivasan
2011-04-26 16:57 ` [PATCH 00/25] Staging: hv: Cleanup vmbus driver code Christoph Hellwig
2011-04-26 17:04 ` KY Srinivasan
2011-04-26 17:04 ` KY Srinivasan
2011-04-26 19:39 ` Greg KH
2011-04-26 23:28 ` Greg KH
2011-04-27 1:54 ` KY Srinivasan
2011-04-27 6:45 ` Christoph Hellwig
2011-04-27 11:47 ` KY Srinivasan
2011-04-27 12:18 ` Christoph Hellwig
2011-04-29 16:32 ` KY Srinivasan
2011-04-29 16:40 ` Greg KH
2011-04-29 17:32 ` KY Srinivasan
2011-05-01 15:40 ` Christoph Hellwig
2011-05-01 15:46 ` KY Srinivasan
2011-05-01 16:07 ` Christoph Hellwig
2011-05-01 18:08 ` KY Srinivasan
2011-05-01 20:53 ` Christoph Hellwig
2011-05-02 19:48 ` KY Srinivasan
2011-05-02 20:00 ` Christoph Hellwig
2011-05-02 21:16 ` KY Srinivasan
2011-05-02 21:35 ` Christoph Hellwig
2011-05-02 22:11 ` KY Srinivasan
2011-05-01 15:39 ` Christoph Hellwig
2011-05-01 15:47 ` Greg KH
2011-05-01 18:56 ` KY Srinivasan
2011-05-01 18:56 ` KY Srinivasan
2011-05-01 20:47 ` Christoph Hellwig
2011-04-28 0:28 ` Greg KH
2011-04-29 14:26 ` KY Srinivasan
2011-04-29 14:26 ` KY Srinivasan
2011-04-29 15:08 ` 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=1303834842-5022-2-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=v-abkane@microsoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.