]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
super-intel.c: Use ROUND_UP() instead of manually coding it
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 20 Mar 2012 21:07:02 +0000 (08:07 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 20 Mar 2012 21:07:02 +0000 (08:07 +1100)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index 958edb5d9fbe35f2da03bea0d7546fbaddf5f40d..a351b60fc7021b8e0633fb710aa9be30a15c4d92 100644 (file)
@@ -318,7 +318,7 @@ static void set_migr_type(struct imsm_dev *dev, __u8 migr_type)
 
 static unsigned int sector_count(__u32 bytes)
 {
-       return ((bytes + (512-1)) & (~(512-1))) / 512;
+       return ROUND_UP(bytes, 512) / 512;
 }
 
 static unsigned int mpb_sectors(struct imsm_super *mpb)