mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] Doc/memory-hotplug.txt: callback function prototype
@ 2015-02-18 18:22 Heinrich Schuchardt
  2015-02-21 23:18 ` [PATCH 1/1 v2] " Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2015-02-18 18:22 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Yasunori Goto, KAMEZAWA Hiroyuki, Dave Hansen, David Rientjes,
	Toshi Kani, linux-doc, linux-kernel, Heinrich Schuchardt

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@gmx.de>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-27 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 18:22 [PATCH 1/1] Doc/memory-hotplug.txt: callback function prototype Heinrich Schuchardt
2015-02-21 23:18 ` [PATCH 1/1 v2] " Heinrich Schuchardt
2015-02-27 22:06   ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome