Commit 57cd5f75 authored by Milind Arun Choudhary's avatar Milind Arun Choudhary Committed by David S. Miller

[NET]: ROUND_UP macro cleanup in drivers/net/ppp_generic.c

ROUND_UP macro cleanup use DIV_ROUND_UP
Signed-off-by: default avatarMilind Arun Choudhary <milindchoudhary@gmail.com>
Acked-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 36226a8d
...@@ -88,8 +88,6 @@ struct ppp_file { ...@@ -88,8 +88,6 @@ struct ppp_file {
#define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp) #define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp)
#define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel) #define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel)
#define ROUNDUP(n, x) (((n) + (x) - 1) / (x))
/* /*
* Data structure describing one ppp unit. * Data structure describing one ppp unit.
* A ppp unit corresponds to a ppp network interface device * A ppp unit corresponds to a ppp network interface device
...@@ -1297,7 +1295,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) ...@@ -1297,7 +1295,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
*/ */
fragsize = len; fragsize = len;
if (nfree > 1) if (nfree > 1)
fragsize = ROUNDUP(fragsize, nfree); fragsize = DIV_ROUND_UP(fragsize, nfree);
/* nbigger channels get fragsize bytes, the rest get fragsize-1, /* nbigger channels get fragsize bytes, the rest get fragsize-1,
except if nbigger==0, then they all get fragsize. */ except if nbigger==0, then they all get fragsize. */
nbigger = len % nfree; nbigger = len % nfree;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment