Skip to content
Snippets Groups Projects
  • Martine Lenders's avatar
    aba75be8
    netdev: fix return value and precondition doc · aba75be8
    Martine Lenders authored
    While reviewing #9942 I noticed that the documentation on the netdev
    driver API is unclear and in some cases outright contradicting itself:
    
    > ```
    > @return              number of bytes used from @p value
    > @return              `< 0` on error, 0 on success
    > ```
    
    IMHO this is unacceptable for such a central API where communication
    
    This fixes a few things and also clarifies preconditions:
    
    - Specifies negative `errno`s clearly so all drivers return the same
      when required
    - Re-iterates parameter preconditions and special cases within the
      parameter documentation itself (might also help towards #9805?)
    - Fixes contradictions within return value documentation
    - Adds missing parameter documentation on `init()`.
    aba75be8
    History
    netdev: fix return value and precondition doc
    Martine Lenders authored
    While reviewing #9942 I noticed that the documentation on the netdev
    driver API is unclear and in some cases outright contradicting itself:
    
    > ```
    > @return              number of bytes used from @p value
    > @return              `< 0` on error, 0 on success
    > ```
    
    IMHO this is unacceptable for such a central API where communication
    
    This fixes a few things and also clarifies preconditions:
    
    - Specifies negative `errno`s clearly so all drivers return the same
      when required
    - Re-iterates parameter preconditions and special cases within the
      parameter documentation itself (might also help towards #9805?)
    - Fixes contradictions within return value documentation
    - Adds missing parameter documentation on `init()`.