Skip to content

Commit a385238

Browse files
aborzeszwesteri
authored andcommitted
thunderbolt: Update nhi.c function documentation
Make nhi.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>
1 parent 4815b75 commit a385238

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

drivers/thunderbolt/nhi.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,10 @@ EXPORT_SYMBOL_GPL(__tb_ring_enqueue);
344344
*
345345
* This function can be called when @start_poll callback of the @ring
346346
* has been called. It will read one completed frame from the ring and
347-
* return it to the caller. Returns %NULL if there is no more completed
348-
* frames.
347+
* return it to the caller.
348+
*
349+
* Return: Pointer to &struct ring_frame, %NULL if there is no more
350+
* completed frames.
349351
*/
350352
struct ring_frame *tb_ring_poll(struct tb_ring *ring)
351353
{
@@ -640,6 +642,8 @@ static struct tb_ring *tb_ring_alloc(struct tb_nhi *nhi, u32 hop, int size,
640642
* @hop: HopID (ring) to allocate
641643
* @size: Number of entries in the ring
642644
* @flags: Flags for the ring
645+
*
646+
* Return: Pointer to &struct tb_ring, %NULL otherwise.
643647
*/
644648
struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size,
645649
unsigned int flags)
@@ -661,6 +665,8 @@ EXPORT_SYMBOL_GPL(tb_ring_alloc_tx);
661665
* interrupt is triggered and masked, instead of callback
662666
* in each Rx frame.
663667
* @poll_data: Optional data passed to @start_poll
668+
*
669+
* Return: Pointer to &struct tb_ring, %NULL otherwise.
664670
*/
665671
struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size,
666672
unsigned int flags, int e2e_tx_hop,
@@ -854,8 +860,9 @@ EXPORT_SYMBOL_GPL(tb_ring_free);
854860
* @cmd: Command to send
855861
* @data: Data to be send with the command
856862
*
857-
* Sends mailbox command to the firmware running on NHI. Returns %0 in
858-
* case of success and negative errno in case of failure.
863+
* Sends mailbox command to the firmware running on NHI.
864+
*
865+
* Return: %0 on success, negative errno otherwise.
859866
*/
860867
int nhi_mailbox_cmd(struct tb_nhi *nhi, enum nhi_mailbox_cmd cmd, u32 data)
861868
{
@@ -891,6 +898,8 @@ int nhi_mailbox_cmd(struct tb_nhi *nhi, enum nhi_mailbox_cmd cmd, u32 data)
891898
*
892899
* The function reads current firmware operation mode using NHI mailbox
893900
* registers and returns it to the caller.
901+
*
902+
* Return: &enum nhi_fw_mode.
894903
*/
895904
enum nhi_fw_mode nhi_mailbox_mode(struct tb_nhi *nhi)
896905
{

0 commit comments

Comments
 (0)