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 17/26] thunderbolt: Update tb.c function documentation
Date: Mon, 8 Sep 2025 18:32:21 +0200 [thread overview]
Message-ID: <20250908163230.2614397-18-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.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/tb.c | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index c14ab1fbeeaf..077ec855eb9d 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -225,14 +225,12 @@ static int tb_enable_clx(struct tb_switch *sw)
return ret == -EOPNOTSUPP ? 0 : ret;
}
-/**
- * tb_disable_clx() - Disable CL states up to host router
- * @sw: Router to start
+/*
+ * Disables CL states from @sw up to the host router.
*
- * Disables CL states from @sw up to the host router. Returns true if
- * any CL state were disabled. This can be used to figure out whether
- * the link was setup by us or the boot firmware so we don't
- * accidentally enable them if they were not enabled during discovery.
+ * This can be used to figure out whether the link was setup by us or the
+ * boot firmware so we don't accidentally enable them if they were not
+ * enabled during discovery.
*/
static bool tb_disable_clx(struct tb_switch *sw)
{
@@ -456,10 +454,8 @@ static void tb_scan_xdomain(struct tb_port *port)
}
}
-/**
- * tb_find_unused_port() - return the first inactive port on @sw
- * @sw: Switch to find the port on
- * @type: Port type to look for
+/*
+ * Returns the first inactive port on @sw.
*/
static struct tb_port *tb_find_unused_port(struct tb_switch *sw,
enum tb_port_type type)
@@ -549,6 +545,8 @@ static struct tb_tunnel *tb_find_first_usb3_tunnel(struct tb *tb,
* from @src_port to @dst_port. Does not take USB3 tunnel starting from
* @src_port and ending on @src_port into account because that bandwidth is
* already included in as part of the "first hop" USB3 tunnel.
+ *
+ * Return: %0 on success, negative errno otherwise.
*/
static int tb_consumed_usb3_pcie_bandwidth(struct tb *tb,
struct tb_port *src_port,
@@ -601,6 +599,8 @@ static int tb_consumed_usb3_pcie_bandwidth(struct tb *tb,
* If there is bandwidth reserved for any of the groups between
* @src_port and @dst_port (but not yet used) that is also taken into
* account in the returned consumed bandwidth.
+ *
+ * Return: %0 on success, negative errno otherwise.
*/
static int tb_consumed_dp_bandwidth(struct tb *tb,
struct tb_port *src_port,
@@ -701,6 +701,8 @@ static bool tb_asym_supported(struct tb_port *src_port, struct tb_port *dst_port
* single link at @port. If @include_asym is set then includes the
* additional banwdith if the links are transitioned into asymmetric to
* direction from @src_port to @dst_port.
+ *
+ * Return: %0 on success, negative errno otherwise.
*/
static int tb_maximum_bandwidth(struct tb *tb, struct tb_port *src_port,
struct tb_port *dst_port, struct tb_port *port,
@@ -807,6 +809,8 @@ static int tb_maximum_bandwidth(struct tb *tb, struct tb_port *src_port,
* If @include_asym is true then includes also bandwidth that can be
* added when the links are transitioned into asymmetric (but does not
* transition the links).
+ *
+ * Return: %0 on success, negative errno otherwise.
*/
static int tb_available_bandwidth(struct tb *tb, struct tb_port *src_port,
struct tb_port *dst_port, int *available_up,
@@ -1029,6 +1033,8 @@ static int tb_create_usb3_tunnels(struct tb_switch *sw)
* (requested + currently consumed) on that link exceed @asym_threshold.
*
* Must be called with available >= requested over all links.
+ *
+ * Return: %0 on success, negative errno otherwise.
*/
static int tb_configure_asym(struct tb *tb, struct tb_port *src_port,
struct tb_port *dst_port, int requested_up,
@@ -1135,6 +1141,8 @@ static int tb_configure_asym(struct tb *tb, struct tb_port *src_port,
* Goes over each link from @src_port to @dst_port and tries to
* transition the link to symmetric if the currently consumed bandwidth
* allows and link asymmetric preference is ignored (if @keep_asym is %false).
+ *
+ * Return: %0 on success, negative errno otherwise.
*/
static int tb_configure_sym(struct tb *tb, struct tb_port *src_port,
struct tb_port *dst_port, bool keep_asym)
--
2.50.1
next prev 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 ` Mika Westerberg [this message]
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-18-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.