@@ -211,11 +211,13 @@ static struct tb_property_dir *__tb_property_parse_dir(const u32 *block,
211211 *
212212 * This function parses the XDomain properties data block into format that
213213 * can be traversed using the helper functions provided by this module.
214- * Upon success returns the parsed directory. In case of error returns
215- * %NULL. The resulting &struct tb_property_dir needs to be released by
214+ *
215+ * The resulting &struct tb_property_dir needs to be released by
216216 * calling tb_property_free_dir() when not needed anymore.
217217 *
218218 * The @block is expected to be root directory.
219+ *
220+ * Return: Pointer to &struct tb_property_dir, %NULL in case of failure.
219221 */
220222struct tb_property_dir * tb_property_parse_dir (const u32 * block ,
221223 size_t block_len )
@@ -238,6 +240,8 @@ struct tb_property_dir *tb_property_parse_dir(const u32 *block,
238240 *
239241 * Creates new, empty property directory. If @uuid is %NULL then the
240242 * directory is assumed to be root directory.
243+ *
244+ * Return: Pointer to &struct tb_property_dir, %NULL in case of failure.
241245 */
242246struct tb_property_dir * tb_property_create_dir (const uuid_t * uuid )
243247{
@@ -481,9 +485,11 @@ static ssize_t __tb_property_format_dir(const struct tb_property_dir *dir,
481485 * @block_len: Length of the property block
482486 *
483487 * This function formats the directory to the packed format that can be
484- * then send over the thunderbolt fabric to receiving host. Returns %0 in
485- * case of success and negative errno on faulure. Passing %NULL in @block
486- * returns number of entries the block takes.
488+ * then sent over the thunderbolt fabric to receiving host.
489+ *
490+ * Passing %NULL in @block returns number of entries the block takes.
491+ *
492+ * Return: %0 on success, negative errno otherwise.
487493 */
488494ssize_t tb_property_format_dir (const struct tb_property_dir * dir , u32 * block ,
489495 size_t block_len )
@@ -505,9 +511,9 @@ ssize_t tb_property_format_dir(const struct tb_property_dir *dir, u32 *block,
505511 * tb_property_copy_dir() - Take a deep copy of directory
506512 * @dir: Directory to copy
507513 *
508- * This function takes a deep copy of @dir and returns back the copy. In
509- * case of error returns %NULL. The resulting directory needs to be
510- * released by calling tb_property_free_dir() .
514+ * The resulting directory needs to be released by calling tb_property_free_dir().
515+ *
516+ * Return: Pointer to &struct tb_property_dir, %NULL in case of failure .
511517 */
512518struct tb_property_dir * tb_property_copy_dir (const struct tb_property_dir * dir )
513519{
@@ -577,6 +583,8 @@ struct tb_property_dir *tb_property_copy_dir(const struct tb_property_dir *dir)
577583 * @parent: Directory to add the property
578584 * @key: Key for the property
579585 * @value: Immediate value to store with the property
586+ *
587+ * Return: %0 on success, negative errno otherwise.
580588 */
581589int tb_property_add_immediate (struct tb_property_dir * parent , const char * key ,
582590 u32 value )
@@ -606,6 +614,8 @@ EXPORT_SYMBOL_GPL(tb_property_add_immediate);
606614 * @buflen: Number of bytes in the data buffer
607615 *
608616 * Function takes a copy of @buf and adds it to the directory.
617+ *
618+ * Return: %0 on success, negative errno otherwise.
609619 */
610620int tb_property_add_data (struct tb_property_dir * parent , const char * key ,
611621 const void * buf , size_t buflen )
@@ -642,6 +652,8 @@ EXPORT_SYMBOL_GPL(tb_property_add_data);
642652 * @text: String to add
643653 *
644654 * Function takes a copy of @text and adds it to the directory.
655+ *
656+ * Return: %0 on success, negative errno otherwise.
645657 */
646658int tb_property_add_text (struct tb_property_dir * parent , const char * key ,
647659 const char * text )
@@ -676,6 +688,8 @@ EXPORT_SYMBOL_GPL(tb_property_add_text);
676688 * @parent: Directory to add the property
677689 * @key: Key for the property
678690 * @dir: Directory to add
691+ *
692+ * Return: %0 on success, negative errno otherwise.
679693 */
680694int tb_property_add_dir (struct tb_property_dir * parent , const char * key ,
681695 struct tb_property_dir * dir )
@@ -716,8 +730,10 @@ EXPORT_SYMBOL_GPL(tb_property_remove);
716730 * @key: Key to look for
717731 * @type: Type of the property
718732 *
719- * Finds and returns property from the given directory. Does not recurse
720- * into sub-directories. Returns %NULL if the property was not found.
733+ * Finds and returns property from the given directory. Does not
734+ * recurse into sub-directories.
735+ *
736+ * Return: Pointer to &struct tb_property, %NULL if the property was not found.
721737 */
722738struct tb_property * tb_property_find (struct tb_property_dir * dir ,
723739 const char * key , enum tb_property_type type )
@@ -737,6 +753,8 @@ EXPORT_SYMBOL_GPL(tb_property_find);
737753 * tb_property_get_next() - Get next property from directory
738754 * @dir: Directory holding properties
739755 * @prev: Previous property in the directory (%NULL returns the first)
756+ *
757+ * Return: Pointer to &struct tb_property, %NULL if property was not found.
740758 */
741759struct tb_property * tb_property_get_next (struct tb_property_dir * dir ,
742760 struct tb_property * prev )
0 commit comments