* [PATCH 6/8]: Use DIV_ROUND_UP macro
@ 2007-07-08 11:41 Gerrit Renker
0 siblings, 0 replies; only message in thread
From: Gerrit Renker @ 2007-07-08 11:41 UTC (permalink / raw)
To: dccp
[ACKVEC]: Use DIV_ROUND_UP macro
This replaces a round-up operation with the macro defined
in include/linux/kernel.h.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ackvec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/net/dccp/ackvec.c
+++ b/net/dccp/ackvec.c
@@ -69,9 +69,8 @@ int dccp_insert_option_ackvec(struct soc
struct dccp_sock *dp = dccp_sk(sk);
struct dccp_ackvec *av = dp->dccps_hc_rx_ackvec;
/* Figure out how many options do we need to represent the ackvec */
- const u16 nr_opts = (av->dccpav_vec_len +
- DCCP_MAX_ACKVEC_OPT_LEN - 1) /
- DCCP_MAX_ACKVEC_OPT_LEN;
+ const u16 nr_opts = DIV_ROUND_UP(av->dccpav_vec_len,
+ DCCP_MAX_ACKVEC_OPT_LEN);
u16 len = av->dccpav_vec_len + 2 * nr_opts, i;
struct timeval now;
u32 elapsed_time;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-08 11:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-08 11:41 [PATCH 6/8]: Use DIV_ROUND_UP macro Gerrit Renker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.