Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754160AbbBRSXa (ORCPT ); Wed, 18 Feb 2015 13:23:30 -0500 Received: from mout.gmx.net ([212.227.17.20]:50123 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbbBRSX2 (ORCPT ); Wed, 18 Feb 2015 13:23:28 -0500 From: Heinrich Schuchardt To: Jonathan Corbet Cc: Yasunori Goto , KAMEZAWA Hiroyuki , Dave Hansen , David Rientjes , Toshi Kani , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Heinrich Schuchardt Subject: [PATCH 1/1] Doc/memory-hotplug.txt: callback function prototype Date: Wed, 18 Feb 2015 19:22:07 +0100 Message-Id: <1424283727-5795-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.1.4 X-Provags-ID: V03:K0:YAEAGHcD1iUXVLccHGf+4NCSuNe0LinImLoD/z2NVbgR6k9xMDa HDIPBM/o6wK8Z0MLaNchxH/DYgBsRYftQeSfmqXhsbi6IRgVyV8ZxDosukRpyDeWEJZYrJ8 3sGdtzIEEEASjnCGmdJT+4tZmiRsg0jQKrSwOXsuhHvAKLE542p0E1e0qXKNgfPzZl54Z0A zjOV1DUHHqZ9W0wcBWMnA== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1887 Lines: 50 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 --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/