From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- super-intel.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/super-intel.c b/super-intel.c index 958edb5..a351b60 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) -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html