Skip to contentSkip to conversation

drivers/char/random.c: #if 0 randomize_range

RFC PATCH In review Adrian Bunk 3 participants 3 messages Apr 17, 2005 – Apr 18, 2005 Random number driver

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 drivers/char/random.c: #if 0 randomize_range

This patch #if 0's the unused global function randomize_range.

---

 drivers/char/random.c  |    2 ++
 include/linux/random.h |    1 -
 2 files changed, 2 insertions(+), 1 deletion(-)
include/linux/random.h renamed from include/linux/random.h.old +0 -1
@@ -65,7 +65,6 @@
 #endif
 
 unsigned int get_random_int(void);
-unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len);
 
 #endif /* __KERNEL___ */
 
drivers/char/random.c renamed from drivers/char/random.c.old +2 -0
@@ -1618,6 +1618,7 @@
  * a <range> with size "len" starting at the return value is inside in the
  * area defined by [start, end], but is otherwise randomized.
  */
+#if 0
 unsigned long
 randomize_range(unsigned long start, unsigned long end, unsigned long len)
 {
@@ -1627,3 +1628,4 @@
 		return 0;
 	return PAGE_ALIGN(get_random_int() % range + start);
 }
+#endif  /*  0  */
#1 lore raw
Quoted 2 lines · Adrian Bunk

This patch #if 0's the unused global function randomize_range.

This is presumably for future work in process randomization. Arjan, what's the status of this bit?

Quoted 33 lines

---

 drivers/char/random.c  |    2 ++
 include/linux/random.h |    1 -
 2 files changed, 2 insertions(+), 1 deletion(-)
include/linux/random.h renamed from include/linux/random.h.old +0 -1
@@ -65,7 +65,6 @@
 #endif
 
 unsigned int get_random_int(void);
-unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len);
 
 #endif /* __KERNEL___ */
 
drivers/char/random.c renamed from drivers/char/random.c.old +2 -0
@@ -1618,6 +1618,7 @@
  * a <range> with size "len" starting at the return value is inside in the
  * area defined by [start, end], but is otherwise randomized.
  */
+#if 0
 unsigned long
 randomize_range(unsigned long start, unsigned long end, unsigned long len)
 {
@@ -1627,3 +1628,4 @@
 		return 0;
 	return PAGE_ALIGN(get_random_int() % range + start);
 }
+#endif  /*  0  */
Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#2 lore raw
Quoted 6 lines · Matt Mackall
Quoted 2 lines · Adrian Bunk

This patch #if 0's the unused global function randomize_range.

This is presumably for future work in process randomization. Arjan, what's the status of this bit?

I'll start submitting more randomisation stuff once 2.6.12 gets out; however I'm more than fine with the #if 0; I'll just remove the if 0's in those patches when I start using this stuff.