aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid0.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index e11dd14d0b43..2120710172c5 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -314,16 +314,16 @@ static int raid0_run (mddev_t *mddev)
314 sector_t space = conf->hash_spacing; 314 sector_t space = conf->hash_spacing;
315 int round; 315 int round;
316 conf->preshift = 0; 316 conf->preshift = 0;
317 if (sizeof(sector_t) > sizeof(unsigned long)) { 317 if (sizeof(sector_t) > sizeof(u32)) {
318 /*shift down space and s so that sector_div will work */ 318 /*shift down space and s so that sector_div will work */
319 while (space > (sector_t) (~(unsigned long)0)) { 319 while (space > (sector_t) (~(u32)0)) {
320 s >>= 1; 320 s >>= 1;
321 space >>= 1; 321 space >>= 1;
322 s += 1; /* force round-up */ 322 s += 1; /* force round-up */
323 conf->preshift++; 323 conf->preshift++;
324 } 324 }
325 } 325 }
326 round = sector_div(s, (unsigned long)space) ? 1 : 0; 326 round = sector_div(s, (u32)space) ? 1 : 0;
327 nb_zone = s + round; 327 nb_zone = s + round;
328 } 328 }
329 printk("raid0 : nb_zone is %d.\n", nb_zone); 329 printk("raid0 : nb_zone is %d.\n", nb_zone);
@@ -443,7 +443,7 @@ static int raid0_make_request (request_queue_t *q, struct bio *bio)
443 volatile 443 volatile
444#endif 444#endif
445 sector_t x = block >> conf->preshift; 445 sector_t x = block >> conf->preshift;
446 sector_div(x, (unsigned long)conf->hash_spacing); 446 sector_div(x, (u32)conf->hash_spacing);
447 zone = conf->hash_table[x]; 447 zone = conf->hash_table[x];
448 } 448 }
449 449