@@ -160,7 +160,7 @@ static int __tb_xdomain_response(struct tb_ctl *ctl, const void *response,
160160 * This can be used to send a XDomain response message to the other
161161 * domain. No response for the message is expected.
162162 *
163- * Return: %0 in case of success and negative errno in case of failure
163+ * Return: %0 on success, negative errno otherwise.
164164 */
165165int tb_xdomain_response (struct tb_xdomain * xd , const void * response ,
166166 size_t size , enum tb_cfg_pkg_type type )
@@ -212,7 +212,7 @@ static int __tb_xdomain_request(struct tb_ctl *ctl, const void *request,
212212 * the other domain. The function waits until the response is received
213213 * or when timeout triggers. Whichever comes first.
214214 *
215- * Return: %0 in case of success and negative errno in case of failure
215+ * Return: %0 on success, negative errno otherwise.
216216 */
217217int tb_xdomain_request (struct tb_xdomain * xd , const void * request ,
218218 size_t request_size , enum tb_cfg_pkg_type request_type ,
@@ -613,6 +613,8 @@ static int tb_xdp_link_state_change_response(struct tb_ctl *ctl, u64 route,
613613 * messages. After this function is called the service driver needs to
614614 * be able to handle calls to callback whenever a package with the
615615 * registered protocol is received.
616+ *
617+ * Return: %0 on success, negative errno otherwise.
616618 */
617619int tb_register_protocol_handler (struct tb_protocol_handler * handler )
618620{
@@ -877,6 +879,8 @@ tb_xdp_schedule_request(struct tb *tb, const struct tb_xdp_header *hdr,
877879 * @drv: Driver to register
878880 *
879881 * Registers new service driver from @drv to the bus.
882+ *
883+ * Return: %0 on success, negative errno otherwise.
880884 */
881885int tb_register_service_driver (struct tb_service_driver * drv )
882886{
@@ -1955,6 +1959,8 @@ static void tb_xdomain_link_exit(struct tb_xdomain *xd)
19551959 *
19561960 * Allocates new XDomain structure and returns pointer to that. The
19571961 * object must be released by calling tb_xdomain_put().
1962+ *
1963+ * Return: Pointer to &struct tb_xdomain, %NULL in case of failure.
19581964 */
19591965struct tb_xdomain * tb_xdomain_alloc (struct tb * tb , struct device * parent ,
19601966 u64 route , const uuid_t * local_uuid ,
@@ -2091,7 +2097,7 @@ void tb_xdomain_remove(struct tb_xdomain *xd)
20912097 * to enable bonding by first enabling the port and waiting for the CL0
20922098 * state.
20932099 *
2094- * Return: %0 in case of success and negative errno in case of error .
2100+ * Return: %0 on success, negative errno otherwise .
20952101 */
20962102int tb_xdomain_lane_bonding_enable (struct tb_xdomain * xd )
20972103{
@@ -2171,10 +2177,14 @@ EXPORT_SYMBOL_GPL(tb_xdomain_lane_bonding_disable);
21712177 * @xd: XDomain connection
21722178 * @hopid: Preferred HopID or %-1 for next available
21732179 *
2174- * Returns allocated HopID or negative errno. Specifically returns
2175- * %-ENOSPC if there are no more available HopIDs. Returned HopID is
2176- * guaranteed to be within range supported by the input lane adapter.
2180+ * Returned HopID is guaranteed to be within range supported by the input
2181+ * lane adapter.
21772182 * Call tb_xdomain_release_in_hopid() to release the allocated HopID.
2183+ *
2184+ * Return:
2185+ * * Allocated HopID - On success.
2186+ * * %-ENOSPC - If there are no more available HopIDs.
2187+ * * Negative errno - Another error occurred.
21782188 */
21792189int tb_xdomain_alloc_in_hopid (struct tb_xdomain * xd , int hopid )
21802190{
@@ -2193,10 +2203,14 @@ EXPORT_SYMBOL_GPL(tb_xdomain_alloc_in_hopid);
21932203 * @xd: XDomain connection
21942204 * @hopid: Preferred HopID or %-1 for next available
21952205 *
2196- * Returns allocated HopID or negative errno. Specifically returns
2197- * %-ENOSPC if there are no more available HopIDs. Returned HopID is
2198- * guaranteed to be within range supported by the output lane adapter.
2199- * Call tb_xdomain_release_in_hopid() to release the allocated HopID.
2206+ * Returned HopID is guaranteed to be within range supported by the
2207+ * output lane adapter.
2208+ * Call tb_xdomain_release_out_hopid() to release the allocated HopID.
2209+ *
2210+ * Return:
2211+ * * Allocated HopID - On success.
2212+ * * %-ENOSPC - If there are no more available HopIDs.
2213+ * * Negative errno - Another error occurred.
22002214 */
22012215int tb_xdomain_alloc_out_hopid (struct tb_xdomain * xd , int hopid )
22022216{
@@ -2245,7 +2259,7 @@ EXPORT_SYMBOL_GPL(tb_xdomain_release_out_hopid);
22452259 * path. If a transmit or receive path is not needed, pass %-1 for those
22462260 * parameters.
22472261 *
2248- * Return: %0 in case of success and negative errno in case of error
2262+ * Return: %0 on success, negative errno otherwise.
22492263 */
22502264int tb_xdomain_enable_paths (struct tb_xdomain * xd , int transmit_path ,
22512265 int transmit_ring , int receive_path ,
@@ -2270,7 +2284,7 @@ EXPORT_SYMBOL_GPL(tb_xdomain_enable_paths);
22702284 * as path/ring parameter means don't care. Normally the callers should
22712285 * pass the same values here as they do when paths are enabled.
22722286 *
2273- * Return: %0 in case of success and negative errno in case of error
2287+ * Return: %0 on success, negative errno otherwise.
22742288 */
22752289int tb_xdomain_disable_paths (struct tb_xdomain * xd , int transmit_path ,
22762290 int transmit_ring , int receive_path ,
@@ -2335,6 +2349,8 @@ static struct tb_xdomain *switch_find_xdomain(struct tb_switch *sw,
23352349 * to the bus (handshake is still in progress).
23362350 *
23372351 * The caller needs to hold @tb->lock.
2352+ *
2353+ * Return: Pointer to &struct tb_xdomain or %NULL if not found.
23382354 */
23392355struct tb_xdomain * tb_xdomain_find_by_uuid (struct tb * tb , const uuid_t * uuid )
23402356{
@@ -2364,6 +2380,8 @@ EXPORT_SYMBOL_GPL(tb_xdomain_find_by_uuid);
23642380 * to the bus (handshake is still in progress).
23652381 *
23662382 * The caller needs to hold @tb->lock.
2383+ *
2384+ * Return: Pointer to &struct tb_xdomain or %NULL if not found.
23672385 */
23682386struct tb_xdomain * tb_xdomain_find_by_link_depth (struct tb * tb , u8 link ,
23692387 u8 depth )
@@ -2393,6 +2411,8 @@ struct tb_xdomain *tb_xdomain_find_by_link_depth(struct tb *tb, u8 link,
23932411 * to the bus (handshake is still in progress).
23942412 *
23952413 * The caller needs to hold @tb->lock.
2414+ *
2415+ * Return: Pointer to &struct tb_xdomain or %NULL if not found.
23962416 */
23972417struct tb_xdomain * tb_xdomain_find_by_route (struct tb * tb , u64 route )
23982418{
@@ -2491,7 +2511,7 @@ static bool remove_directory(const char *key, const struct tb_property_dir *dir)
24912511 * notified so they can re-read properties of this host if they are
24922512 * interested.
24932513 *
2494- * Return: %0 on success and negative errno on failure
2514+ * Return: %0 on success, negative errno otherwise.
24952515 */
24962516int tb_register_property_dir (const char * key , struct tb_property_dir * dir )
24972517{
0 commit comments