linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] relay: use macro PAGE_ALIGN instead of FIX_SIZE
@ 2013-03-20  9:26 zhangwei(Jovi)
  0 siblings, 0 replies; only message in thread
From: zhangwei(Jovi) @ 2013-03-20  9:26 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton

Macro FIX_SIZE is same as PAGE_ALIGN at present,
so use PAGE_ALIGN instead.

Thanks Andrew found this.

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 kernel/relay.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/relay.c b/kernel/relay.c
index d0c638f..5666dad 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -550,9 +550,6 @@ static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb,
 	return NOTIFY_OK;
 }

-/* Needs a _much_ better name... */
-#define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE)
-
 /**
  *	relay_open - create a new relay channel
  *	@base_filename: base name of files to create, %NULL for buffering only
@@ -591,7 +588,7 @@ struct rchan *relay_open(const char *base_filename,
 	chan->version = RELAYFS_CHANNEL_VERSION;
 	chan->n_subbufs = n_subbufs;
 	chan->subbuf_size = subbuf_size;
-	chan->alloc_size = FIX_SIZE(subbuf_size * n_subbufs);
+	chan->alloc_size = PAGE_ALIGN(subbuf_size * n_subbufs);
 	chan->parent = parent;
 	chan->private_data = private_data;
 	if (base_filename) {
-- 
1.7.9.7



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-20  9:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20  9:26 [PATCH] relay: use macro PAGE_ALIGN instead of FIX_SIZE zhangwei(Jovi)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).