From patchwork Sat Nov 19 00:34:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Corbet X-Patchwork-Id: 83041 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp377067qge; Fri, 18 Nov 2016 16:35:17 -0800 (PST) X-Received: by 10.13.220.197 with SMTP id f188mr2565266ywe.6.1479515717270; Fri, 18 Nov 2016 16:35:17 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si2222873ybb.115.2016.11.18.16.35.16; Fri, 18 Nov 2016 16:35:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932125AbcKSAeu (ORCPT + 26 others); Fri, 18 Nov 2016 19:34:50 -0500 Received: from ms.lwn.net ([45.79.88.28]:40498 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753805AbcKSAem (ORCPT ); Fri, 18 Nov 2016 19:34:42 -0500 Received: from tpad.lwn.net (localhost [127.0.0.1]) by ms.lwn.net (Postfix) with ESMTPA id 2A46E730E; Sat, 19 Nov 2016 00:34:41 +0000 (UTC) From: Jonathan Corbet To: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Jason Baron , William Cohen , Jonathan Corbet Subject: [PATCH 2/3] doc: debugobjects: actually pull in the kerneldoc comments Date: Fri, 18 Nov 2016 17:34:14 -0700 Message-Id: <1479515655-20556-3-git-send-email-corbet@lwn.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479515655-20556-1-git-send-email-corbet@lwn.net> References: <1479515655-20556-1-git-send-email-corbet@lwn.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the appropriate markup to get the kerneldoc comments out of lib/debugobjects.c that have never seen the light of day until now. A logical next step, left for the reader at the moment, is to move the function descriptions *out* of debug-objects.rst and into the kerneldoc comments themselves. Signed-off-by: Jonathan Corbet --- Documentation/core-api/debug-objects.rst | 34 ++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) -- 2.7.4 diff --git a/Documentation/core-api/debug-objects.rst b/Documentation/core-api/debug-objects.rst index 50a9707addfe..ac926fd55a64 100644 --- a/Documentation/core-api/debug-objects.rst +++ b/Documentation/core-api/debug-objects.rst @@ -64,14 +64,8 @@ tracking objects and the state of the internal tracking objects pool. Debug functions =============== -Debug object function reference -------------------------------- - .. kernel-doc:: lib/debugobjects.c - :export: - -debug_object_init -------------------- + :functions: debug_object_init This function is called whenever the initialization function of a real object is called. @@ -93,8 +87,8 @@ number of warnings including a full stack trace is printk'ed. The calling code must use debug_object_init_on_stack() and remove the object before leaving the function which allocated it. See next section. -debug_object_init_on_stack ------------------------------- +.. kernel-doc:: lib/debugobjects.c + :functions: debug_object_init_on_stack This function is called whenever the initialization function of a real object which resides on the stack is called. @@ -117,8 +111,8 @@ An object which is on the stack must be removed from the tracker by calling debug_object_free() before the function which allocates the object returns. Otherwise we keep track of stale objects. -debug_object_activate ------------------------ +.. kernel-doc:: lib/debugobjects.c + :functions: debug_object_activate This function is called whenever the activation function of a real object is called. @@ -141,8 +135,9 @@ object. When the activation is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_ACTIVE. -debug_object_deactivate -------------------------- + +.. kernel-doc:: lib/debugobjects.c + :functions: debug_object_deactivate This function is called whenever the deactivation function of a real object is called. @@ -154,8 +149,8 @@ or destroyed objects. When the deactivation is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_INACTIVE. -debug_object_destroy ----------------------- +.. kernel-doc:: lib/debugobjects.c + :functions: debug_object_destroy This function is called to mark an object destroyed. This is useful to prevent the usage of invalid objects, which are still available in @@ -173,8 +168,8 @@ deactivate an active object in order to prevent damage to the subsystem. When the destruction is legitimate, then the state of the associated tracker object is set to ODEBUG_STATE_DESTROYED. -debug_object_free -------------------- +.. kernel-doc:: lib/debugobjects.c + :functions: debug_object_free This function is called before an object is freed. @@ -189,8 +184,9 @@ prevent damage to the subsystem. Note that debug_object_free removes the object from the tracker. Later usage of the object is detected by the other debug checks. -debug_object_assert_init ---------------------------- + +.. kernel-doc:: lib/debugobjects.c + :functions: debug_object_assert_init This function is called to assert that an object has been initialized.