aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-06-16 16:54:21 +1000
committerNeilBrown <neilb@suse.de>2009-06-16 16:54:21 +1000
commit070ec55d07157a3041f92654135c3c6e2eaaf901 (patch)
tree10f24d859e669ba4a671204ce4176a2b43fdaae5 /drivers/md/linear.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/linear.c')
-rw-r--r--drivers/md/linear.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 64f1f3e046e..31f8ec7131b 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -28,7 +28,7 @@
static inline dev_info_t *which_dev(mddev_t *mddev, sector_t sector)
{
dev_info_t *hash;
- linear_conf_t *conf = mddev_to_conf(mddev);
+ linear_conf_t *conf = mddev->private;
sector_t idx = sector >> conf->sector_shift;
/*
@@ -79,7 +79,7 @@ static int linear_mergeable_bvec(struct request_queue *q,
static void linear_unplug(struct request_queue *q)
{
mddev_t *mddev = q->queuedata;
- linear_conf_t *conf = mddev_to_conf(mddev);
+ linear_conf_t *conf = mddev->private;
int i;
for (i=0; i < mddev->raid_disks; i++) {
@@ -91,7 +91,7 @@ static void linear_unplug(struct request_queue *q)
static int linear_congested(void *data, int bits)
{
mddev_t *mddev = data;
- linear_conf_t *conf = mddev_to_conf(mddev);
+ linear_conf_t *conf = mddev->private;
int i, ret = 0;
for (i = 0; i < mddev->raid_disks && !ret ; i++) {
@@ -103,7 +103,7 @@ static int linear_congested(void *data, int bits)
static sector_t linear_size(mddev_t *mddev, sector_t sectors, int raid_disks)
{
- linear_conf_t *conf = mddev_to_conf(mddev);
+ linear_conf_t *conf = mddev->private;
WARN_ONCE(sectors || raid_disks,
"%s does not support generic reshape\n", __func__);
@@ -294,7 +294,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
if (!newconf)
return -ENOMEM;
- newconf->prev = mddev_to_conf(mddev);
+ newconf->prev = mddev->private;
mddev->private = newconf;
mddev->raid_disks++;
md_set_array_sectors(mddev, linear_size(mddev, 0, 0));
@@ -304,7 +304,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
static int linear_stop (mddev_t *mddev)
{
- linear_conf_t *conf = mddev_to_conf(mddev);
+ linear_conf_t *conf = mddev->private;
blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
do {