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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux