relay: move FIX_SIZE macro into relay.c
PATCH 2/2 relay: move FIX_SIZE macro into relay.c
It's better to place FIX_SIZE macro in relay.c, instead of relay.h
Signed-off-by zhangwei(Jovi) <[email protected]>
--- include/linux/relay.h | 3 --- kernel/relay.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-)
include/linux/relay.h +0 -3
@@ -20,9 +20,6 @@#include <linux/poll.h> #include <linux/kref.h> -/* Needs a _much_ better name... */ -#define FIX_SIZE (x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE) -/* * Tracks changes to rchan/rchan_buf structs */
kernel/relay.c +3 -0
@@ -550,6 +550,9 @@ 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
Signature · 1 line
1.7.9.7
Andrew Morton
maintainerkernel/relay.c static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb, · line 555
Quoted 3 lines · On Mon, 18 Mar 2013 10:51:54 +0800 "zhangwei(Jovi)" <[email protected]>…
kernel/relay.c +3
-0+/* Needs a _much_ better name... */ +#define FIX_SIZE (x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE) +
Gad. That's the same as PAGE_ALIGN(), is it not?
Quoted 8 lines · Andrew Morton
kernel/relay.c static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb, · line 555
Quoted 3 lines · On Mon, 18 Mar 2013 10:51:54 +0800 "zhangwei(Jovi)" <[email protected]>…
kernel/relay.c +3
-0+/* Needs a _much_ better name... */ +#define FIX_SIZE (x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE) +Gad. That's the same as
PAGE_ALIGN(), is it not?
Indeed, I will post another patch to change this, base on -mm. Thanks.
.jovi