Skip to contentSkip to conversation

relay: move FIX_SIZE macro into relay.c

PATCH In review zhangwei(Jovi) 2 participants 3 messages Mar 18, 2013 – Mar 20, 2013 Relay

lore
Share & tools
lore
#0 lore raw

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

---
 include/linux/relay.h |    3 ---
 kernel/relay.c        |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
include/linux/relay.h +0 -3
index 91cacc3..d7c8359 100644
@@ -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
index d21006c..4c2959b 100644
@@ -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
maintainer
#1 lore raw

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?

#2 lore raw
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