All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-usb@vger.kernel.org
Cc: Yehezkel Bernat <YehezkelShB@gmail.com>,
	Lukas Wunner <lukas@wunner.de>,
	Andreas Noever <andreas.noever@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH 14/26] thunderbolt: Update property.c function documentation
Date: Mon,  8 Sep 2025 18:32:18 +0200	[thread overview]
Message-ID: <20250908163230.2614397-15-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20250908163230.2614397-1-mika.westerberg@linux.intel.com>

From: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>

Make property.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/thunderbolt/property.c | 38 +++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/drivers/thunderbolt/property.c b/drivers/thunderbolt/property.c
index dc555cda98e6..31aa0516932a 100644
--- a/drivers/thunderbolt/property.c
+++ b/drivers/thunderbolt/property.c
@@ -211,11 +211,13 @@ static struct tb_property_dir *__tb_property_parse_dir(const u32 *block,
  *
  * This function parses the XDomain properties data block into format that
  * can be traversed using the helper functions provided by this module.
- * Upon success returns the parsed directory. In case of error returns
- * %NULL. The resulting &struct tb_property_dir needs to be released by
+ *
+ * The resulting &struct tb_property_dir needs to be released by
  * calling tb_property_free_dir() when not needed anymore.
  *
  * The @block is expected to be root directory.
+ *
+ * Return: Pointer to &struct tb_property_dir, %NULL in case of failure.
  */
 struct tb_property_dir *tb_property_parse_dir(const u32 *block,
 					      size_t block_len)
@@ -238,6 +240,8 @@ struct tb_property_dir *tb_property_parse_dir(const u32 *block,
  *
  * Creates new, empty property directory. If @uuid is %NULL then the
  * directory is assumed to be root directory.
+ *
+ * Return: Pointer to &struct tb_property_dir, %NULL in case of failure.
  */
 struct tb_property_dir *tb_property_create_dir(const uuid_t *uuid)
 {
@@ -481,9 +485,11 @@ static ssize_t __tb_property_format_dir(const struct tb_property_dir *dir,
  * @block_len: Length of the property block
  *
  * This function formats the directory to the packed format that can be
- * then send over the thunderbolt fabric to receiving host. Returns %0 in
- * case of success and negative errno on faulure. Passing %NULL in @block
- * returns number of entries the block takes.
+ * then sent over the thunderbolt fabric to receiving host.
+ *
+ * Passing %NULL in @block returns number of entries the block takes.
+ *
+ * Return: %0 on success, negative errno otherwise.
  */
 ssize_t tb_property_format_dir(const struct tb_property_dir *dir, u32 *block,
 			       size_t block_len)
@@ -505,9 +511,9 @@ ssize_t tb_property_format_dir(const struct tb_property_dir *dir, u32 *block,
  * tb_property_copy_dir() - Take a deep copy of directory
  * @dir: Directory to copy
  *
- * This function takes a deep copy of @dir and returns back the copy. In
- * case of error returns %NULL. The resulting directory needs to be
- * released by calling tb_property_free_dir().
+ * The resulting directory needs to be released by calling tb_property_free_dir().
+ *
+ * Return: Pointer to &struct tb_property_dir, %NULL in case of failure.
  */
 struct tb_property_dir *tb_property_copy_dir(const struct tb_property_dir *dir)
 {
@@ -577,6 +583,8 @@ struct tb_property_dir *tb_property_copy_dir(const struct tb_property_dir *dir)
  * @parent: Directory to add the property
  * @key: Key for the property
  * @value: Immediate value to store with the property
+ *
+ * Return: %0 on success, negative errno otherwise.
  */
 int tb_property_add_immediate(struct tb_property_dir *parent, const char *key,
 			      u32 value)
@@ -606,6 +614,8 @@ EXPORT_SYMBOL_GPL(tb_property_add_immediate);
  * @buflen: Number of bytes in the data buffer
  *
  * Function takes a copy of @buf and adds it to the directory.
+ *
+ * Return: %0 on success, negative errno otherwise.
  */
 int tb_property_add_data(struct tb_property_dir *parent, const char *key,
 			 const void *buf, size_t buflen)
@@ -642,6 +652,8 @@ EXPORT_SYMBOL_GPL(tb_property_add_data);
  * @text: String to add
  *
  * Function takes a copy of @text and adds it to the directory.
+ *
+ * Return: %0 on success, negative errno otherwise.
  */
 int tb_property_add_text(struct tb_property_dir *parent, const char *key,
 			 const char *text)
@@ -676,6 +688,8 @@ EXPORT_SYMBOL_GPL(tb_property_add_text);
  * @parent: Directory to add the property
  * @key: Key for the property
  * @dir: Directory to add
+ *
+ * Return: %0 on success, negative errno otherwise.
  */
 int tb_property_add_dir(struct tb_property_dir *parent, const char *key,
 			struct tb_property_dir *dir)
@@ -716,8 +730,10 @@ EXPORT_SYMBOL_GPL(tb_property_remove);
  * @key: Key to look for
  * @type: Type of the property
  *
- * Finds and returns property from the given directory. Does not recurse
- * into sub-directories. Returns %NULL if the property was not found.
+ * Finds and returns property from the given directory. Does not
+ * recurse into sub-directories.
+ *
+ * Return: Pointer to &struct tb_property, %NULL if the property was not found.
  */
 struct tb_property *tb_property_find(struct tb_property_dir *dir,
 	const char *key, enum tb_property_type type)
@@ -737,6 +753,8 @@ EXPORT_SYMBOL_GPL(tb_property_find);
  * tb_property_get_next() - Get next property from directory
  * @dir: Directory holding properties
  * @prev: Previous property in the directory (%NULL returns the first)
+ *
+ * Return: Pointer to &struct tb_property, %NULL if property was not found.
  */
 struct tb_property *tb_property_get_next(struct tb_property_dir *dir,
 					 struct tb_property *prev)
-- 
2.50.1


  parent reply	other threads:[~2025-09-08 16:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08 16:32 [PATCH 00/26] thunderbolt: kernel-doc fixes Mika Westerberg
2025-09-08 16:32 ` [PATCH 01/26] thunderbolt: Update acpi.c function documentation Mika Westerberg
2025-09-08 16:32 ` [PATCH 02/26] thunderbolt: Update cap.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 03/26] thunderbolt: Update clx.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 04/26] thunderbolt: Update ctl.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 05/26] thunderbolt: Add missing documentation in ctl.h tb_cfg_request struct Mika Westerberg
2025-09-08 16:32 ` [PATCH 06/26] thunderbolt: Update dma_port.c function documentation Mika Westerberg
2025-09-08 16:32 ` [PATCH 07/26] thunderbolt: Update domain.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 08/26] thunderbolt: Update eeprom.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 09/26] thunderbolt: Update lc.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 10/26] thunderbolt: Update nhi.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 11/26] thunderbolt: Add missing documentation in nhi_regs.h ring_desc structure Mika Westerberg
2025-09-08 16:32 ` [PATCH 12/26] thunderbolt: Update nvm.c function documentation Mika Westerberg
2025-09-08 16:32 ` [PATCH 13/26] thunderbolt: Update path.c " Mika Westerberg
2025-09-08 16:32 ` Mika Westerberg [this message]
2025-09-08 16:32 ` [PATCH 15/26] thunderbolt: Update retimer.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 16/26] thunderbolt: Update switch.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 17/26] thunderbolt: Update tb.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 18/26] thunderbolt: Update tb.h " Mika Westerberg
2025-09-08 16:32 ` [PATCH 19/26] thunderbolt: Add missing documentation in tb.h Mika Westerberg
2025-09-08 16:32 ` [PATCH 20/26] thunderbolt: Update tmu.c function documentation Mika Westerberg
2025-09-08 16:32 ` [PATCH 21/26] thunderbolt: Update tunnel.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 22/26] thunderbolt: Update tunnel.h " Mika Westerberg
2025-09-08 16:32 ` [PATCH 23/26] thunderbolt: Update usb4.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 24/26] thunderbolt: Update usb4_port.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 25/26] thunderbolt: Update xdomain.c " Mika Westerberg
2025-09-08 16:32 ` [PATCH 26/26] thunderbolt: Update thunderbolt.h header file Mika Westerberg
2025-09-17  5:52 ` [PATCH 00/26] thunderbolt: kernel-doc fixes Mika Westerberg
2025-09-17  8:15   ` Andy Shevchenko

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=20250908163230.2614397-15-mika.westerberg@linux.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=alan.borzeszkowski@linux.intel.com \
    --cc=andreas.noever@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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 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.