aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-06-16 02:54:21 -0400
committerNeilBrown <neilb@suse.de>2009-06-16 02:54:21 -0400
commit070ec55d07157a3041f92654135c3c6e2eaaf901 (patch)
tree10f24d859e669ba4a671204ce4176a2b43fdaae5 /drivers/md/raid0.c
parenta6b3deafe0c50e3e873e8ed5cc8abfcb25c05eff (diff)
md: remove mddev_to_conf "helper" macro
Having a macro just to cast a void* isn't really helpful. I would must rather see that we are simply de-referencing ->private, than have to know what the macro does. So open code the macro everywhere and remove the pointless cast. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index e2e9c1833336..77764dad1bcb 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -26,7 +26,7 @@
26static void raid0_unplug(struct request_queue *q) 26static void raid0_unplug(struct request_queue *q)
27{ 27{
28 mddev_t *mddev = q->queuedata; 28 mddev_t *mddev = q->queuedata;
29 raid0_conf_t *conf = mddev_to_conf(mddev); 29 raid0_conf_t *conf = mddev->private;
30 mdk_rdev_t **devlist = conf->devlist; 30 mdk_rdev_t **devlist = conf->devlist;
31 int i; 31 int i;
32 32
@@ -40,7 +40,7 @@ static void raid0_unplug(struct request_queue *q)
40static int raid0_congested(void *data, int bits) 40static int raid0_congested(void *data, int bits)
41{ 41{
42 mddev_t *mddev = data; 42 mddev_t *mddev = data;
43 raid0_conf_t *conf = mddev_to_conf(mddev); 43 raid0_conf_t *conf = mddev->private;
44 mdk_rdev_t **devlist = conf->devlist; 44 mdk_rdev_t **devlist = conf->devlist;
45 int i, ret = 0; 45 int i, ret = 0;
46 46
@@ -294,7 +294,7 @@ static int raid0_run(mddev_t *mddev)
294 294
295static int raid0_stop(mddev_t *mddev) 295static int raid0_stop(mddev_t *mddev)
296{ 296{
297 raid0_conf_t *conf = mddev_to_conf(mddev); 297 raid0_conf_t *conf = mddev->private;
298 298
299 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ 299 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
300 kfree(conf->strip_zone); 300 kfree(conf->strip_zone);
@@ -327,7 +327,7 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
327{ 327{
328 mddev_t *mddev = q->queuedata; 328 mddev_t *mddev = q->queuedata;
329 unsigned int sect_in_chunk, chunksect_bits, chunk_sects; 329 unsigned int sect_in_chunk, chunksect_bits, chunk_sects;
330 raid0_conf_t *conf = mddev_to_conf(mddev); 330 raid0_conf_t *conf = mddev->private;
331 struct strip_zone *zone; 331 struct strip_zone *zone;
332 mdk_rdev_t *tmp_dev; 332 mdk_rdev_t *tmp_dev;
333 sector_t chunk; 333 sector_t chunk;
@@ -406,7 +406,7 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev)
406#ifdef MD_DEBUG 406#ifdef MD_DEBUG
407 int j, k, h; 407 int j, k, h;
408 char b[BDEVNAME_SIZE]; 408 char b[BDEVNAME_SIZE];
409 raid0_conf_t *conf = mddev_to_conf(mddev); 409 raid0_conf_t *conf = mddev->private;
410 410
411 h = 0; 411 h = 0;
412 for (j = 0; j < conf->nr_strip_zones; j++) { 412 for (j = 0; j < conf->nr_strip_zones; j++) {