From e40ccdb5614ad5ebc9508ce7b9b80315f8ab2dda Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Mon, 22 Sep 2008 19:22:58 -0700 Subject: [PATCH] --- yaml --- r: 111765 b: refs/heads/master c: 6a19309db0a02d821494f4df754046c85a230627 h: refs/heads/master i: 111763: ace7fdb2f966728a9d902402b007e4b349a2793f v: v3 --- [refs] | 2 +- trunk/drivers/atm/eni.c | 2 +- trunk/drivers/atm/horizon.c | 8 ++++---- trunk/drivers/atm/zatm.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 2c49fe04fabe..6195939480e7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ca330c5a913a9b1690c709f4cfcd6be0c8696b14 +refs/heads/master: 6a19309db0a02d821494f4df754046c85a230627 diff --git a/trunk/drivers/atm/eni.c b/trunk/drivers/atm/eni.c index 41b2204ebc6e..5503bfc8e132 100644 --- a/trunk/drivers/atm/eni.c +++ b/trunk/drivers/atm/eni.c @@ -1270,7 +1270,7 @@ static int comp_tx(struct eni_dev *eni_dev,int *pcr,int reserved,int *pre, if (*pre < 3) (*pre)++; /* else fail later */ div = pre_div[*pre]*-*pcr; DPRINTK("max div %d\n",div); - *res = (TS_CLOCK+div-1)/div-1; + *res = DIV_ROUND_UP(TS_CLOCK, div)-1; } if (*res < 0) *res = 0; if (*res > MID_SEG_MAX_RATE) *res = MID_SEG_MAX_RATE; diff --git a/trunk/drivers/atm/horizon.c b/trunk/drivers/atm/horizon.c index c0ac728dc564..615412364e99 100644 --- a/trunk/drivers/atm/horizon.c +++ b/trunk/drivers/atm/horizon.c @@ -635,7 +635,7 @@ static int make_rate (const hrz_dev * dev, u32 c, rounding r, // take care of rounding switch (r) { case round_down: - pre = (br+(c<qos.rxtp.max_sdu = 65464; /* fix this - we may want to receive 64kB SDUs later */ - cells = (vcc->qos.rxtp.max_sdu+ATM_AAL5_TRAILER+ - ATM_CELL_PAYLOAD-1)/ATM_CELL_PAYLOAD; + cells = DIV_ROUND_UP(vcc->qos.rxtp.max_sdu + ATM_AAL5_TRAILER, + ATM_CELL_PAYLOAD); zatm_vcc->pool = pool_index(cells*ATM_CELL_PAYLOAD); } else { @@ -820,7 +820,7 @@ static int alloc_shaper(struct atm_dev *dev,int *pcr,int min,int max,int ubr) } else { i = 255; - m = (ATM_OC3_PCR*255+max-1)/max; + m = DIV_ROUND_UP(ATM_OC3_PCR*255, max); } } if (i > m) {