@@ -558,7 +558,7 @@ static inline void *tb_priv(struct tb *tb)
558558 * During switch alloc/init tb_upstream_port()->remote may be NULL, even for
559559 * non root switches (on the NHI port remote is always NULL).
560560 *
561- * Return: Returns the upstream port of the switch .
561+ * Return: Pointer to &struct tb_port .
562562 */
563563static inline struct tb_port * tb_upstream_port (struct tb_switch * sw )
564564{
@@ -569,8 +569,8 @@ static inline struct tb_port *tb_upstream_port(struct tb_switch *sw)
569569 * tb_is_upstream_port() - Is the port upstream facing
570570 * @port: Port to check
571571 *
572- * Returns true if @port is upstream facing port. In case of dual link
573- * ports both return true.
572+ * Return: % true if @port is upstream facing port. In case of dual link
573+ * ports, both return % true.
574574 */
575575static inline bool tb_is_upstream_port (const struct tb_port * port )
576576{
@@ -613,7 +613,7 @@ static inline const char *tb_width_name(enum tb_link_width width)
613613 * tb_port_has_remote() - Does the port have switch connected downstream
614614 * @port: Port to check
615615 *
616- * Returns true only when the port is primary port and has remote set.
616+ * Return: % true only when the port is primary port and has remote set.
617617 */
618618static inline bool tb_port_has_remote (const struct tb_port * port )
619619{
@@ -905,8 +905,9 @@ static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw)
905905 * tb_switch_downstream_port() - Return downstream facing port of parent router
906906 * @sw: Device router pointer
907907 *
908- * Only call for device routers. Returns the downstream facing port of
909- * the parent router.
908+ * Call only for device routers.
909+ *
910+ * Return: Pointer to &struct tb_port or %NULL in case of failure.
910911 */
911912static inline struct tb_port * tb_switch_downstream_port (struct tb_switch * sw )
912913{
@@ -918,6 +919,8 @@ static inline struct tb_port *tb_switch_downstream_port(struct tb_switch *sw)
918919/**
919920 * tb_switch_depth() - Returns depth of the connected router
920921 * @sw: Router
922+ *
923+ * Return: Router depth level as a number.
921924 */
922925static inline int tb_switch_depth (const struct tb_switch * sw )
923926{
@@ -1010,6 +1013,9 @@ static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw)
10101013 * is handling @sw this function can be called. It is valid to call this
10111014 * after tb_switch_alloc() and tb_switch_configure() has been called
10121015 * (latter only for SW CM case).
1016+ *
1017+ * Return: %true if switch is handled by ICM, %false if handled by
1018+ * software CM.
10131019 */
10141020static inline bool tb_switch_is_icm (const struct tb_switch * sw )
10151021{
@@ -1037,6 +1043,8 @@ int tb_switch_tmu_configure(struct tb_switch *sw, enum tb_switch_tmu_mode mode);
10371043 *
10381044 * Checks if given router TMU mode is configured to @mode. Note the
10391045 * router TMU might not be enabled to this mode.
1046+ *
1047+ * Return: %true if TMU mode is equal to @mode, %false otherwise.
10401048 */
10411049static inline bool tb_switch_tmu_is_configured (const struct tb_switch * sw ,
10421050 enum tb_switch_tmu_mode mode )
@@ -1048,8 +1056,8 @@ static inline bool tb_switch_tmu_is_configured(const struct tb_switch *sw,
10481056 * tb_switch_tmu_is_enabled() - Checks if the specified TMU mode is enabled
10491057 * @sw: Router whose TMU mode to check
10501058 *
1051- * Return true if hardware TMU configuration matches the requested
1052- * configuration (and is not %TB_SWITCH_TMU_MODE_OFF).
1059+ * Return: % true if hardware TMU configuration matches the requested
1060+ * configuration (and is not %TB_SWITCH_TMU_MODE_OFF), %false otherwise .
10531061 */
10541062static inline bool tb_switch_tmu_is_enabled (const struct tb_switch * sw )
10551063{
@@ -1069,9 +1077,10 @@ int tb_switch_clx_disable(struct tb_switch *sw);
10691077 * @clx: The CLx states to check for
10701078 *
10711079 * Checks if the specified CLx is enabled on the router upstream link.
1072- * Returns true if any of the given states is enabled.
10731080 *
10741081 * Not applicable for a host router.
1082+ *
1083+ * Return: %true if any of the given states is enabled, %false otherwise.
10751084 */
10761085static inline bool tb_switch_clx_is_enabled (const struct tb_switch * sw ,
10771086 unsigned int clx )
@@ -1103,7 +1112,7 @@ struct tb_port *tb_next_port_on_path(struct tb_port *start, struct tb_port *end,
11031112 * @src: Source adapter
11041113 * @dst: Destination adapter
11051114 *
1106- * Returns %true only if the specified path from source adapter (@src)
1115+ * Return: %true only if the specified path from source adapter (@src)
11071116 * to destination adapter (@dst) is directed downstream.
11081117 */
11091118static inline bool
@@ -1235,7 +1244,7 @@ static inline int tb_route_length(u64 route)
12351244 *
12361245 * Port must not be the upstream port (otherwise a loop is created).
12371246 *
1238- * Return: Returns a route to the switch behind @port.
1247+ * Return: Route to the switch behind @port.
12391248 */
12401249static inline u64 tb_downstream_route (struct tb_port * port )
12411250{
@@ -1263,7 +1272,7 @@ static inline struct tb_switch *tb_xdomain_parent(struct tb_xdomain *xd)
12631272 * tb_xdomain_downstream_port() - Return downstream facing port of parent router
12641273 * @xd: Xdomain pointer
12651274 *
1266- * Returns the downstream port the XDomain is connected to .
1275+ * Return: Pointer to &struct tb_port or %NULL in case of failure .
12671276 */
12681277static inline struct tb_port * tb_xdomain_downstream_port (struct tb_xdomain * xd )
12691278{
@@ -1291,7 +1300,7 @@ static inline struct tb_retimer *tb_to_retimer(struct device *dev)
12911300 * usb4_switch_version() - Returns USB4 version of the router
12921301 * @sw: Router to check
12931302 *
1294- * Returns major version of USB4 router (%1 for v1, %2 for v2 and so
1303+ * Return: Major version of USB4 router (%1 for v1, %2 for v2 and so
12951304 * on). Can be called to pre-USB4 router too and in that case returns %0.
12961305 */
12971306static 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)
13031312 * tb_switch_is_usb4() - Is the switch USB4 compliant
13041313 * @sw: Switch to check
13051314 *
1306- * Returns true if the @sw is USB4 compliant router, false otherwise.
1315+ * Return: % true if the @sw is USB4 compliant router, % false otherwise.
13071316 */
13081317static inline bool tb_switch_is_usb4 (const struct tb_switch * sw )
13091318{
0 commit comments