[PATCH 1/1] Doc/memory-hotplug.txt: callback function prototype

From: Heinrich Schuchardt
Date: Wed Feb 18 2015 - 13:23:32 EST


Documentation/memory-hotplug.txt describes that a callback function can
be added to the notification chain by calling hotplug_memory_notifier().

The function prototype of the callback funciton is mssing. This missing
information is added by the patch.

The description of the arguments of the callback function is
reworked.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@xxxxxx>
---
Documentation/memory-hotplug.txt | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index ea03abf..72e6304 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -386,11 +386,19 @@ MEMORY_CANCEL_OFFLINE
MEMORY_OFFLINE
Generated after offlining memory is complete.

-A callback routine can be registered by
- hotplug_memory_notifier(callback_func, priority)
+A callback routine can be registered by calling

-The second argument of callback function (action) is event types of above.
-The third argument is passed by pointer of struct memory_notify.
+ hotplug_memory_notifier(callback_func, priority)
+
+where the callback function has the following prototype:
+
+ int callback_func(
+ struct notifier_block *self, unsigned long action, void *arg);
+
+The first argument of the callback function (self) is a pointer to the block
+of the notifier chain that points to the callback function itself.
+The second argument (action) is one of the event types described above.
+The third argument (arg) passes a pointer of struct memory_notify.

struct memory_notify {
unsigned long start_pfn;
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/