From: zhangwei(Jovi) Date: Tue, 30 Apr 2013 22:28:41 +0000 (-0700) Subject: relay: use macro PAGE_ALIGN instead of FIX_SIZE X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a05342cbd62b7f6dacb8d71683d799f5e5e694b8;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git relay: use macro PAGE_ALIGN instead of FIX_SIZE Macro FIX_SIZE is same as PAGE_ALIGN at present, so use PAGE_ALIGN instead. Thanks Andrew found this. Signed-off-by: zhangwei(Jovi) Cc: Jens Axboe Cc: Al Viro Cc: Eric Dumazet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/relay.c b/kernel/relay.c index 4c2959b6c34d..eef0d113b79e 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) {