From: Jes Sorensen Date: Tue, 20 Mar 2012 21:07:02 +0000 (+1100) Subject: super-intel.c: Use ROUND_UP() instead of manually coding it X-Git-Tag: mdadm-3.2.4~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=654a3817ea86def3e7dbd861e539759e23a275f0;p=thirdparty%2Fmdadm.git super-intel.c: Use ROUND_UP() instead of manually coding it Signed-off-by: Jes Sorensen Signed-off-by: NeilBrown --- diff --git a/super-intel.c b/super-intel.c index 958edb5d..a351b60f 100644 --- a/super-intel.c +++ b/super-intel.c @@ -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)