* [PATCH] dccp: use roundup instead of opencoding @ 2008-12-05 21:43 Ilpo Järvinen 2008-12-05 21:47 ` Ben Hutchings 0 siblings, 1 reply; 4+ messages in thread From: Ilpo Järvinen @ 2008-12-05 21:43 UTC (permalink / raw) To: David Miller, Arnaldo Carvalho de Melo; +Cc: Netdev [-- Attachment #1: Type: TEXT/PLAIN, Size: 560 bytes --] Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> --- net/dccp/output.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/dccp/output.c b/net/dccp/output.c index fea30cd..1b75ece 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c @@ -175,7 +175,7 @@ unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) * make it a multiple of 4 */ - cur_mps -= ((5 + 6 + 10 + 6 + 6 + 6 + 3) / 4) * 4; + cur_mps -= roundup(5 + 6 + 10 + 6 + 6 + 6); /* And store cached results */ icsk->icsk_pmtu_cookie = pmtu; -- 1.5.2.2 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dccp: use roundup instead of opencoding 2008-12-05 21:43 [PATCH] dccp: use roundup instead of opencoding Ilpo Järvinen @ 2008-12-05 21:47 ` Ben Hutchings 2008-12-05 21:53 ` Ilpo Järvinen 0 siblings, 1 reply; 4+ messages in thread From: Ben Hutchings @ 2008-12-05 21:47 UTC (permalink / raw) To: Ilpo Järvinen; +Cc: David Miller, Arnaldo Carvalho de Melo, Netdev On Fri, 2008-12-05 at 23:43 +0200, Ilpo Järvinen wrote: > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> > --- > net/dccp/output.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/net/dccp/output.c b/net/dccp/output.c > index fea30cd..1b75ece 100644 > --- a/net/dccp/output.c > +++ b/net/dccp/output.c > @@ -175,7 +175,7 @@ unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) > * make it a multiple of 4 > */ > > - cur_mps -= ((5 + 6 + 10 + 6 + 6 + 6 + 3) / 4) * 4; > + cur_mps -= roundup(5 + 6 + 10 + 6 + 6 + 6); Maybe you should check that with your compiler. Ben. > /* And store cached results */ > icsk->icsk_pmtu_cookie = pmtu; > -- > 1.5.2.2 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dccp: use roundup instead of opencoding 2008-12-05 21:47 ` Ben Hutchings @ 2008-12-05 21:53 ` Ilpo Järvinen 2008-12-06 6:40 ` David Miller 0 siblings, 1 reply; 4+ messages in thread From: Ilpo Järvinen @ 2008-12-05 21:53 UTC (permalink / raw) To: Ben Hutchings; +Cc: David Miller, Arnaldo Carvalho de Melo, Netdev [-- Attachment #1: Type: TEXT/PLAIN, Size: 1464 bytes --] On Fri, 5 Dec 2008, Ben Hutchings wrote: > On Fri, 2008-12-05 at 23:43 +0200, Ilpo Järvinen wrote: > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> > > --- > > net/dccp/output.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/net/dccp/output.c b/net/dccp/output.c > > index fea30cd..1b75ece 100644 > > --- a/net/dccp/output.c > > +++ b/net/dccp/output.c > > @@ -175,7 +175,7 @@ unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) > > * make it a multiple of 4 > > */ > > > > - cur_mps -= ((5 + 6 + 10 + 6 + 6 + 6 + 3) / 4) * 4; > > + cur_mps -= roundup(5 + 6 + 10 + 6 + 6 + 6); > > Maybe you should check that with your compiler. Ah, sorry, I thought I'd made plenty of builds but sadly dccp wasn't included in any of them... Thanks for the alert. Added the missing , 4 below. -- i. [PATCH] dccp: use roundup instead of opencoding Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> --- net/dccp/output.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/dccp/output.c b/net/dccp/output.c index fea30cd..1b75ece 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c @@ -175,7 +175,7 @@ unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) * make it a multiple of 4 */ - cur_mps -= ((5 + 6 + 10 + 6 + 6 + 6 + 3) / 4) * 4; + cur_mps -= roundup(5 + 6 + 10 + 6 + 6 + 6, 4); /* And store cached results */ icsk->icsk_pmtu_cookie = pmtu; -- 1.5.2.2 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dccp: use roundup instead of opencoding 2008-12-05 21:53 ` Ilpo Järvinen @ 2008-12-06 6:40 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2008-12-06 6:40 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: bhutchings, acme, netdev From: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Fri, 5 Dec 2008 23:53:41 +0200 (EET) > [PATCH] dccp: use roundup instead of opencoding > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Applied to net-next-2.6, thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-06 6:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-05 21:43 [PATCH] dccp: use roundup instead of opencoding Ilpo Järvinen 2008-12-05 21:47 ` Ben Hutchings 2008-12-05 21:53 ` Ilpo Järvinen 2008-12-06 6:40 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox