[PATCH] UHCI: Move code for cleaning up unlinked URBs
[powerpc.git] / drivers / md / raid0.c
index abbca15..cb8c631 100644 (file)
@@ -306,9 +306,6 @@ static int raid0_run (mddev_t *mddev)
        printk("raid0 : conf->hash_spacing is %llu blocks.\n",
                (unsigned long long)conf->hash_spacing);
        {
-#if __GNUC__ < 3
-               volatile
-#endif
                sector_t s = mddev->array_size;
                sector_t space = conf->hash_spacing;
                int round;
@@ -334,13 +331,14 @@ static int raid0_run (mddev_t *mddev)
                goto out_free_conf;
        size = conf->strip_zone[cur].size;
 
-       for (i=0; i< nb_zone; i++) {
-               conf->hash_table[i] = conf->strip_zone + cur;
+       conf->hash_table[0] = conf->strip_zone + cur;
+       for (i=1; i< nb_zone; i++) {
                while (size <= conf->hash_spacing) {
                        cur++;
                        size += conf->strip_zone[cur].size;
                }
                size -= conf->hash_spacing;
+               conf->hash_table[i] = conf->strip_zone + cur;
        }
        if (conf->preshift) {
                conf->hash_spacing >>= conf->preshift;
@@ -375,7 +373,7 @@ out_free_conf:
        kfree(conf);
        mddev->private = NULL;
 out:
-       return 1;
+       return -ENOMEM;
 }
 
 static int raid0_stop (mddev_t *mddev)
@@ -439,9 +437,6 @@ static int raid0_make_request (request_queue_t *q, struct bio *bio)
  
 
        {
-#if __GNUC__ < 3
-               volatile
-#endif
                sector_t x = block >> conf->preshift;
                sector_div(x, (u32)conf->hash_spacing);
                zone = conf->hash_table[x];