fec: Use DIV_ROUND_UP macro
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 21 May 2013 05:44:26 +0000 (05:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 May 2013 07:05:34 +0000 (00:05 -0700)
Use the standard DIV_ROUND_UP macro in order to provide better readability.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c

index 2f4b3e028012f594ffbb14173d7a3594009b2bb8..6b5dc58c56d856435cd13079ec2abdc0ccbe59c5 100644 (file)
@@ -242,7 +242,7 @@ static void *swap_buffer(void *bufaddr, int len)
        int i;
        unsigned int *buf = bufaddr;
 
-       for (i = 0; i < (len + 3) / 4; i++, buf++)
+       for (i = 0; i < DIV_ROUND_UP(len, 4); i++, buf++)
                *buf = cpu_to_be32(*buf);
 
        return bufaddr;