lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1424283727-5795-1-git-send-email-xypron.glpk@gmx.de>
Date:	Wed, 18 Feb 2015 19:22:07 +0100
From:	Heinrich Schuchardt <xypron.glpk@....de>
To:	Jonathan Corbet <corbet@....net>
Cc:	Yasunori Goto <y-goto@...fujitsu.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Dave Hansen <dave.hansen@...el.com>,
	David Rientjes <rientjes@...gle.com>,
	Toshi Kani <toshi.kani@...com>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Heinrich Schuchardt <xypron.glpk@....de>
Subject: [PATCH 1/1] Doc/memory-hotplug.txt: callback function prototype

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ