From f6e495a2b317fd7f3693d7c9217abfe943cbb3c6 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Tue, 1 Jul 2014 14:56:20 +0200 Subject: mptfusion: simplify rounding Rounding up to a multiple of 4 should be done using the ALIGN macro. As a bonus, this also makes the generated code smaller. In GetIocFacts(), sz is assigned to a few lines below without being read in the meantime, so it is ok that it doesn't end up with the same value as facts->FWImageSize. Signed-off-by: Rasmus Villemoes Reviewed-by: Joe Lawrence Signed-off-by: Christoph Hellwig --- drivers/message/fusion/mptctl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/message/fusion/mptctl.c') diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index b0a892a2bf1b..70bb7530b22c 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c @@ -1741,12 +1741,7 @@ mptctl_replace_fw (unsigned long arg) /* Allocate memory for the new FW image */ - newFwSize = karg.newImageSize; - - if (newFwSize & 0x01) - newFwSize += 1; - if (newFwSize & 0x02) - newFwSize += 2; + newFwSize = ALIGN(karg.newImageSize, 4); mpt_alloc_fw_memory(ioc, newFwSize); if (ioc->cached_fw == NULL) -- cgit v1.2.3-55-g7522