linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: linux-modules@vger.kernel.org
Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Subject: [PATCH 1/3] Fix return value doc for kmod_module_get_info()
Date: Tue, 11 May 2021 11:06:13 -0700	[thread overview]
Message-ID: <20210511180615.400191-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20210511180615.400191-1-lucas.demarchi@intel.com>

We don't return 0 on success, we return the number of elements we added
to the list.
---
 libkmod/libkmod-module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
index 76a6dc3..b6320cc 100644
--- a/libkmod/libkmod-module.c
+++ b/libkmod/libkmod-module.c
@@ -2277,7 +2277,7 @@ list_error:
  *
  * After use, free the @list by calling kmod_module_info_free_list().
  *
- * Returns: 0 on success or < 0 otherwise.
+ * Returns: number of entries in @list on success or < 0 otherwise.
  */
 KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_list **list)
 {
-- 
2.31.1


  reply	other threads:[~2021-05-11 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 18:06 [PATCH 0/3] Fix modules.builtin.alias.bin creation Lucas De Marchi
2021-05-11 18:06 ` Lucas De Marchi [this message]
2021-05-11 18:06 ` [PATCH 2/3] depmod: fix modules.builtin.alias.bin output Lucas De Marchi
2021-05-11 18:06 ` [PATCH 3/3] testsuite: update gitignore Lucas De Marchi

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20210511180615.400191-2-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=linux-modules@vger.kernel.org \
    --cc=peter.kjellerstedt@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).