All of
 help / color / mirror / Atom feed
From: David Vernet <>
Subject: [PATCH] Documentation: livepatch: Add kernel-doc link to klp_enable_patch
Date: Thu,  9 Dec 2021 08:53:04 -0800	[thread overview]
Message-ID: <> (raw)

The `klp_enable_patch()` function is the main entrypoint to the livepatch
subsystem, and is invoked by a KLP module from the module_init callback
when it is ready to be enabled.  The livepatch documentation specifies that
`klp_enable_patch()` should be invoked from the `module_init()` callback,
but does not actually link the user to the function's kerneldoc comment.

This simple change therefore adds a kernel-doc directive to link the
`klp_enable_patch()` function's kerneldoc comment in the livepatch
documentation page. With this, kernel/livepatch/core.c no longer comes up
as a file containing an unused doc with
`scripts/ kernel/livepatch`

Signed-off-by: David Vernet <>
 Documentation/livepatch/livepatch.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Documentation/livepatch/livepatch.rst b/Documentation/livepatch/livepatch.rst
index 68e3651e8af9..4fa9e4ebcc3a 100644
--- a/Documentation/livepatch/livepatch.rst
+++ b/Documentation/livepatch/livepatch.rst
@@ -312,8 +312,15 @@ the patch cannot get enabled.
 The livepatch gets enabled by calling klp_enable_patch() from
-the module_init() callback. The system will start using the new
-implementation of the patched functions at this stage.
+the module_init() callback:
+.. kernel-doc:: kernel/livepatch/core.c
+   :functions: klp_enable_patch
+The system will start using the new implementation of the patched functions at
+this stage.
 First, the addresses of the patched functions are found according to their
 names. The special relocations, mentioned in the section "New functions",

             reply	other threads:[~2021-12-09 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 16:53 David Vernet [this message]
2021-12-10  9:25 ` [PATCH] Documentation: livepatch: Add kernel-doc link to klp_enable_patch Petr Mladek
2021-12-10 18:24   ` David Vernet
2021-12-13 16:06     ` Petr Mladek
2021-12-14  8:54       ` Miroslav Benes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.