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 18/26] thunderbolt: Update tb.h function documentation
Date: Mon,  8 Sep 2025 18:32:22 +0200	[thread overview]
Message-ID: <20250908163230.2614397-19-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 tb.h 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/tb.h | 37 +++++++++++++++++++++++--------------
 1 file changed, 23 insertions(+), 14 deletions(-)

diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index f503bad86413..c1ffaf0bb39e 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -558,7 +558,7 @@ static inline void *tb_priv(struct tb *tb)
  * During switch alloc/init tb_upstream_port()->remote may be NULL, even for
  * non root switches (on the NHI port remote is always NULL).
  *
- * Return: Returns the upstream port of the switch.
+ * Return: Pointer to &struct tb_port.
  */
 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw)
 {
@@ -569,8 +569,8 @@ static inline struct tb_port *tb_upstream_port(struct tb_switch *sw)
  * tb_is_upstream_port() - Is the port upstream facing
  * @port: Port to check
  *
- * Returns true if @port is upstream facing port. In case of dual link
- * ports both return true.
+ * Return: %true if @port is upstream facing port. In case of dual link
+ * ports, both return %true.
  */
 static inline bool tb_is_upstream_port(const struct tb_port *port)
 {
@@ -613,7 +613,7 @@ static inline const char *tb_width_name(enum tb_link_width width)
  * tb_port_has_remote() - Does the port have switch connected downstream
  * @port: Port to check
  *
- * Returns true only when the port is primary port and has remote set.
+ * Return: %true only when the port is primary port and has remote set.
  */
 static inline bool tb_port_has_remote(const struct tb_port *port)
 {
@@ -905,8 +905,9 @@ static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw)
  * tb_switch_downstream_port() - Return downstream facing port of parent router
  * @sw: Device router pointer
  *
- * Only call for device routers. Returns the downstream facing port of
- * the parent router.
+ * Call only for device routers.
+ *
+ * Return: Pointer to &struct tb_port or %NULL in case of failure.
  */
 static inline struct tb_port *tb_switch_downstream_port(struct tb_switch *sw)
 {
@@ -918,6 +919,8 @@ static inline struct tb_port *tb_switch_downstream_port(struct tb_switch *sw)
 /**
  * tb_switch_depth() - Returns depth of the connected router
  * @sw: Router
+ *
+ * Return: Router depth level as a number.
  */
 static inline int tb_switch_depth(const struct tb_switch *sw)
 {
@@ -1010,6 +1013,9 @@ static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw)
  * is handling @sw this function can be called. It is valid to call this
  * after tb_switch_alloc() and tb_switch_configure() has been called
  * (latter only for SW CM case).
+ *
+ * Return: %true if switch is handled by ICM, %false if handled by
+ * software CM.
  */
 static inline bool tb_switch_is_icm(const struct tb_switch *sw)
 {
@@ -1037,6 +1043,8 @@ int tb_switch_tmu_configure(struct tb_switch *sw, enum tb_switch_tmu_mode mode);
  *
  * Checks if given router TMU mode is configured to @mode. Note the
  * router TMU might not be enabled to this mode.
+ *
+ * Return: %true if TMU mode is equal to @mode, %false otherwise.
  */
 static inline bool tb_switch_tmu_is_configured(const struct tb_switch *sw,
 					       enum tb_switch_tmu_mode mode)
@@ -1048,8 +1056,8 @@ static inline bool tb_switch_tmu_is_configured(const struct tb_switch *sw,
  * tb_switch_tmu_is_enabled() - Checks if the specified TMU mode is enabled
  * @sw: Router whose TMU mode to check
  *
- * Return true if hardware TMU configuration matches the requested
- * configuration (and is not %TB_SWITCH_TMU_MODE_OFF).
+ * Return: %true if hardware TMU configuration matches the requested
+ * configuration (and is not %TB_SWITCH_TMU_MODE_OFF), %false otherwise.
  */
 static inline bool tb_switch_tmu_is_enabled(const struct tb_switch *sw)
 {
@@ -1069,9 +1077,10 @@ int tb_switch_clx_disable(struct tb_switch *sw);
  * @clx: The CLx states to check for
  *
  * Checks if the specified CLx is enabled on the router upstream link.
- * Returns true if any of the given states is enabled.
  *
  * Not applicable for a host router.
+ *
+ * Return: %true if any of the given states is enabled, %false otherwise.
  */
 static inline bool tb_switch_clx_is_enabled(const struct tb_switch *sw,
 					    unsigned int clx)
@@ -1103,7 +1112,7 @@ struct tb_port *tb_next_port_on_path(struct tb_port *start, struct tb_port *end,
  * @src: Source adapter
  * @dst: Destination adapter
  *
- * Returns %true only if the specified path from source adapter (@src)
+ * Return: %true only if the specified path from source adapter (@src)
  * to destination adapter (@dst) is directed downstream.
  */
 static inline bool
@@ -1235,7 +1244,7 @@ static inline int tb_route_length(u64 route)
  *
  * Port must not be the upstream port (otherwise a loop is created).
  *
- * Return: Returns a route to the switch behind @port.
+ * Return: Route to the switch behind @port.
  */
 static inline u64 tb_downstream_route(struct tb_port *port)
 {
@@ -1263,7 +1272,7 @@ static inline struct tb_switch *tb_xdomain_parent(struct tb_xdomain *xd)
  * tb_xdomain_downstream_port() - Return downstream facing port of parent router
  * @xd: Xdomain pointer
  *
- * Returns the downstream port the XDomain is connected to.
+ * Return: Pointer to &struct tb_port or %NULL in case of failure.
  */
 static inline struct tb_port *tb_xdomain_downstream_port(struct tb_xdomain *xd)
 {
@@ -1291,7 +1300,7 @@ static inline struct tb_retimer *tb_to_retimer(struct device *dev)
  * usb4_switch_version() - Returns USB4 version of the router
  * @sw: Router to check
  *
- * Returns major version of USB4 router (%1 for v1, %2 for v2 and so
+ * Return: Major version of USB4 router (%1 for v1, %2 for v2 and so
  * on). Can be called to pre-USB4 router too and in that case returns %0.
  */
 static inline unsigned int usb4_switch_version(const struct tb_switch *sw)
@@ -1303,7 +1312,7 @@ static inline unsigned int usb4_switch_version(const struct tb_switch *sw)
  * tb_switch_is_usb4() - Is the switch USB4 compliant
  * @sw: Switch to check
  *
- * Returns true if the @sw is USB4 compliant router, false otherwise.
+ * Return: %true if the @sw is USB4 compliant router, %false otherwise.
  */
 static inline bool tb_switch_is_usb4(const struct tb_switch *sw)
 {
-- 
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 ` [PATCH 14/26] thunderbolt: Update property.c " Mika Westerberg
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 ` Mika Westerberg [this message]
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-19-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.