Re: [PATCH 1/6] doc: add structured doc for ptrlist.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/14/2018 12:54 PM, Luc Van Oostenryck wrote:
> Convert existing API doc in ptrlist.c to a kerneldoc-like
> format and document a few more interfaces.
> 
> This is in preparation tu support the extraction of API
> documention from the source files.
> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> ---
>  ptrlist.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 54 insertions(+), 10 deletions(-)
> 
> diff --git a/ptrlist.c b/ptrlist.c
> index 8402f8d2b..6ea63ab4f 100644
> --- a/ptrlist.c
> +++ b/ptrlist.c
> @@ -1,10 +1,13 @@
>  /*
>   * ptrlist.c
>   *
> - * Pointer list manipulation
> - *
>   * (C) Copyright Linus Torvalds 2003-2005
>   */
> +
> +///
> +// Pointer list manipulation
> +// -------------------------
> +
>  #include <stdlib.h>
>  #include <string.h>
>  #include <assert.h>
> @@ -16,6 +19,10 @@
>  __DECLARE_ALLOCATOR(struct ptr_list, ptrlist);
>  __ALLOCATOR(struct ptr_list, "ptr list", ptrlist);
>  
> +///
> +// get the size of a ptrlist
> +// @head: the head of the list
> +// Returns the size of the list given by @head.
>  int ptr_list_size(struct ptr_list *head)
>  {
>  	int nr = 0;

I'm happy to see that you/we don't have to list the function name
(since people seem to mistype it or not edit it when the function changes).


-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux