All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milind Arun Choudhary <milindchoudhary@gmail.com>
To: kernel-janitors@lists.osdl.org
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	linux-ppp@vger.kernel.org, paulus@samba.org
Subject: [KJ] [PATCH]ROUND_UP macro cleanup in drivers/net/ppp_generic.c
Date: Wed, 04 Apr 2007 17:53:37 +0000	[thread overview]
Message-ID: <20070404174944.GC9830@arun.site> (raw)
In-Reply-To: <20070403024345.GB9479@arun.site>

ROUND_UP macro cleanup use DIV_ROUND_UP

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>

---
 ppp_generic.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index ef58e41..4b302f3 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -88,8 +88,6 @@ struct ppp_file {
 #define PF_TO_PPP(pf)		PF_TO_X(pf, struct ppp)
 #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.
  * 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)
 	 */
 	fragsize = len;
 	if (nfree > 1)
-		fragsize = ROUNDUP(fragsize, nfree);
+		fragsize = DIV_ROUND_UP(fragsize, nfree);
 	/* nbigger channels get fragsize bytes, the rest get fragsize-1,
 	   except if nbigger=0, then they all get fragsize. */
 	nbigger = len % nfree;
---
Milind Arun Choudhary
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

WARNING: multiple messages have this Message-ID (diff)
From: Milind Arun Choudhary <milindchoudhary@gmail.com>
To: kernel-janitors@lists.osdl.org
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	linux-ppp@vger.kernel.org, paulus@samba.org
Subject: [KJ][PATCH]ROUND_UP macro cleanup in drivers/net/ppp_generic.c
Date: Wed, 04 Apr 2007 17:46:51 +0000	[thread overview]
Message-ID: <20070404174944.GC9830@arun.site> (raw)
In-Reply-To: <20070403024345.GB9479@arun.site>

ROUND_UP macro cleanup use DIV_ROUND_UP

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>

---
 ppp_generic.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index ef58e41..4b302f3 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -88,8 +88,6 @@ struct ppp_file {
 #define PF_TO_PPP(pf)		PF_TO_X(pf, struct ppp)
 #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.
  * 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)
 	 */
 	fragsize = len;
 	if (nfree > 1)
-		fragsize = ROUNDUP(fragsize, nfree);
+		fragsize = DIV_ROUND_UP(fragsize, nfree);
 	/* nbigger channels get fragsize bytes, the rest get fragsize-1,
 	   except if nbigger=0, then they all get fragsize. */
 	nbigger = len % nfree;
---
Milind Arun Choudhary

WARNING: multiple messages have this Message-ID (diff)
From: Milind Arun Choudhary <milindchoudhary@gmail.com>
To: kernel-janitors@lists.osdl.org
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	linux-ppp@vger.kernel.org, paulus@samba.org
Subject: [KJ][PATCH]ROUND_UP macro cleanup in drivers/net/ppp_generic.c
Date: Wed, 4 Apr 2007 23:19:44 +0530	[thread overview]
Message-ID: <20070404174944.GC9830@arun.site> (raw)

ROUND_UP macro cleanup use DIV_ROUND_UP

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>

---
 ppp_generic.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index ef58e41..4b302f3 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -88,8 +88,6 @@ struct ppp_file {
 #define PF_TO_PPP(pf)		PF_TO_X(pf, struct ppp)
 #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.
  * 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)
 	 */
 	fragsize = len;
 	if (nfree > 1)
-		fragsize = ROUNDUP(fragsize, nfree);
+		fragsize = DIV_ROUND_UP(fragsize, nfree);
 	/* nbigger channels get fragsize bytes, the rest get fragsize-1,
 	   except if nbigger==0, then they all get fragsize. */
 	nbigger = len % nfree;
---
Milind Arun Choudhary

  parent reply	other threads:[~2007-04-04 17:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-03  2:43 [KJ][PATCH]ROUND_UP macro cleanup in drivers/net/ixgb Milind Arun Choudhary
2007-04-03  2:55 ` [KJ] [PATCH]ROUND_UP " Milind Arun Choudhary
2007-04-03  5:45 ` Kok, Auke
2007-04-03  5:45   ` [KJ][PATCH]ROUND_UP " Kok, Auke
2007-04-04 17:46 ` Milind Arun Choudhary [this message]
2007-04-04 17:53   ` [KJ] [PATCH]ROUND_UP macro cleanup in drivers/net/ppp_generic.c Milind Arun Choudhary
2007-04-04 17:49   ` [KJ][PATCH]ROUND_UP " Milind Arun Choudhary
2007-04-09 18:28   ` [KJ] [PATCH]ROUND_UP " Paul Mackerras
2007-04-09 18:28     ` [KJ][PATCH]ROUND_UP " Paul Mackerras
2007-04-09 18:28     ` Paul Mackerras
  -- strict thread matches above, loose matches on Subject: below --
2007-04-04 17:37 [KJ][PATCH]ROUND_UP macro cleanup in drivers/char/lp.c Milind Arun Choudhary
2007-04-04 17:49 ` [KJ] [PATCH]ROUND_UP " Milind Arun Choudhary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070404174944.GC9830@arun.site \
    --to=milindchoudhary@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.