You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/13 15:06:37 UTC

[incubator-nuttx] branch master updated (9399167 -> de1ad1f)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 9399167  drivers/mtd/w25.c: fix finfo format warning
     new eaa75b1  libs/libc: fix typos in comments
     new de1ad1f  net: fix typos, incorrect comments, nxstyle

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 include/nuttx/net/ip.h             |  19 +++---
 include/nuttx/net/net.h            |  30 +++------
 libs/libc/queue/sq_remafter.c      |   4 +-
 libs/libc/stdio/legacy_dtoa.c      |   2 +-
 net/bluetooth/bluetooth_sockif.c   |   4 +-
 net/can/can_sockif.c               |   2 +-
 net/icmp/icmp_sockif.c             |   4 +-
 net/icmpv6/icmpv6_sockif.c         |   4 +-
 net/ieee802154/ieee802154_sockif.c |   4 +-
 net/inet/inet_sockif.c             |   4 +-
 net/local/local.h                  |   9 +--
 net/local/local_listen.c           |   2 +-
 net/local/local_sockif.c           |   4 +-
 net/netlink/netlink_sockif.c       |   2 +-
 net/pkt/pkt_sockif.c               |   4 +-
 net/socket/getsockopt.c            |   8 +--
 net/socket/recvfrom.c              |  16 ++---
 net/socket/recvmsg.c               |  16 ++---
 net/tcp/tcp.h                      |   2 +-
 net/tcp/tcp_getsockopt.c           |   2 +-
 net/usrsock/usrsock.h              | 123 ++++++++++++++++++++-----------------
 net/usrsock/usrsock_accept.c       |  14 ++---
 net/usrsock/usrsock_bind.c         |   8 +--
 net/usrsock/usrsock_conn.c         |   2 -
 net/usrsock/usrsock_getpeername.c  |   2 +-
 net/usrsock/usrsock_getsockname.c  |   4 +-
 net/usrsock/usrsock_getsockopt.c   |  15 ++---
 net/usrsock/usrsock_ioctl.c        |   5 +-
 net/usrsock/usrsock_listen.c       |   2 +-
 net/usrsock/usrsock_recvfrom.c     |   8 ++-
 net/usrsock/usrsock_sendto.c       |   6 +-
 net/usrsock/usrsock_setsockopt.c   |   5 +-
 net/usrsock/usrsock_socket.c       |   2 -
 net/usrsock/usrsock_sockif.c       |   4 +-
 34 files changed, 172 insertions(+), 170 deletions(-)


[incubator-nuttx] 01/02: libs/libc: fix typos in comments

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit eaa75b11f8d4393499c5a0c83810415da412c10f
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Sun Dec 13 15:52:32 2020 +0200

    libs/libc: fix typos in comments
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 libs/libc/queue/sq_remafter.c | 4 ++--
 libs/libc/stdio/legacy_dtoa.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libs/libc/queue/sq_remafter.c b/libs/libc/queue/sq_remafter.c
index 9fe9267..c019bd6 100644
--- a/libs/libc/queue/sq_remafter.c
+++ b/libs/libc/queue/sq_remafter.c
@@ -47,8 +47,8 @@
  * Name: sq_remafter
  *
  * Description:
- *   sq_remafter removes the entry following 'node' from the'queue'  Returns
- *   a reference to the removed entry.
+ *   sq_remafter removes the entry following 'node' from the 'queue'.
+ *   Returns a reference to the removed entry.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/stdio/legacy_dtoa.c b/libs/libc/stdio/legacy_dtoa.c
index 60b203a..07ad1c2 100644
--- a/libs/libc/stdio/legacy_dtoa.c
+++ b/libs/libc/stdio/legacy_dtoa.c
@@ -129,7 +129,7 @@ typedef struct bigint_s bigint_t;
  * Private Data
  ****************************************************************************/
 
-/* REVISIT:  __dtoa is not thread safe due to thse two global variables.
+/* REVISIT:  __dtoa is not thread safe due to these two global variables.
  * Options:
  *
  * 1. Allocate on stack.  g_freelist is rather large, however.. around 275


[incubator-nuttx] 02/02: net: fix typos, incorrect comments, nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit de1ad1fdb319c87c4b2d1405075e7cb34e120377
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Sun Dec 13 15:58:02 2020 +0200

    net: fix typos, incorrect comments, nxstyle
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 include/nuttx/net/ip.h             |  19 +++---
 include/nuttx/net/net.h            |  30 +++------
 net/bluetooth/bluetooth_sockif.c   |   4 +-
 net/can/can_sockif.c               |   2 +-
 net/icmp/icmp_sockif.c             |   4 +-
 net/icmpv6/icmpv6_sockif.c         |   4 +-
 net/ieee802154/ieee802154_sockif.c |   4 +-
 net/inet/inet_sockif.c             |   4 +-
 net/local/local.h                  |   9 +--
 net/local/local_listen.c           |   2 +-
 net/local/local_sockif.c           |   4 +-
 net/netlink/netlink_sockif.c       |   2 +-
 net/pkt/pkt_sockif.c               |   4 +-
 net/socket/getsockopt.c            |   8 +--
 net/socket/recvfrom.c              |  16 ++---
 net/socket/recvmsg.c               |  16 ++---
 net/tcp/tcp.h                      |   2 +-
 net/tcp/tcp_getsockopt.c           |   2 +-
 net/usrsock/usrsock.h              | 123 ++++++++++++++++++++-----------------
 net/usrsock/usrsock_accept.c       |  14 ++---
 net/usrsock/usrsock_bind.c         |   8 +--
 net/usrsock/usrsock_conn.c         |   2 -
 net/usrsock/usrsock_getpeername.c  |   2 +-
 net/usrsock/usrsock_getsockname.c  |   4 +-
 net/usrsock/usrsock_getsockopt.c   |  15 ++---
 net/usrsock/usrsock_ioctl.c        |   5 +-
 net/usrsock/usrsock_listen.c       |   2 +-
 net/usrsock/usrsock_recvfrom.c     |   8 ++-
 net/usrsock/usrsock_sendto.c       |   6 +-
 net/usrsock/usrsock_setsockopt.c   |   5 +-
 net/usrsock/usrsock_socket.c       |   2 -
 net/usrsock/usrsock_sockif.c       |   4 +-
 32 files changed, 169 insertions(+), 167 deletions(-)

diff --git a/include/nuttx/net/ip.h b/include/nuttx/net/ip.h
index 3ec30d2..4e6b940 100644
--- a/include/nuttx/net/ip.h
+++ b/include/nuttx/net/ip.h
@@ -61,6 +61,7 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* IP Version Mask (bits 0-3 of first byte) */
 
 #define IP_VERSION_MASK  0x70
@@ -188,13 +189,13 @@ struct ipv4_stats_s
   net_stats_t recv;       /* Number of received packets at the IP layer */
   net_stats_t sent;       /* Number of sent packets at the IP layer */
   net_stats_t vhlerr;     /* Number of packets dropped due to wrong
-                             IP version or header length */
+                           * IP version or header length */
   net_stats_t fragerr;    /* Number of packets dropped since they
-                             were IP fragments */
+                           * were IP fragments */
   net_stats_t chkerr;     /* Number of packets dropped due to IP
-                             checksum errors */
+                           * checksum errors */
   net_stats_t protoerr;   /* Number of packets dropped since they
-                             were neither ICMP, UDP nor TCP */
+                           * were neither ICMP, UDP nor TCP */
 };
 #endif /* CONFIG_NET_IPv6 */
 
@@ -205,9 +206,9 @@ struct ipv6_stats_s
   net_stats_t recv;       /* Number of received packets at the IP layer */
   net_stats_t sent;       /* Number of sent packets at the IP layer */
   net_stats_t vhlerr;     /* Number of packets dropped due to wrong
-                             IP version or header length */
+                           * IP version or header length */
   net_stats_t protoerr;   /* Number of packets dropped since they
-                             were neither ICMP, UDP nor TCP */
+                           * were neither ICMP, UDP nor TCP */
 };
 #endif /* CONFIG_NET_IPv6 */
 #endif /* CONFIG_NET_STATISTICS */
@@ -279,14 +280,14 @@ extern "C"
  ****************************************************************************/
 
 #ifdef CONFIG_ENDIAN_BIG
-   /* Big-endian byte order: 11223344 */
+  /* Big-endian byte order: 11223344 */
 
 #  define ip4_addr1(ipaddr) (((ipaddr) >> 24) & 0xff)
 #  define ip4_addr2(ipaddr) (((ipaddr) >> 16) & 0xff)
 #  define ip4_addr3(ipaddr) (((ipaddr) >>  8) & 0xff)
 #  define ip4_addr4(ipaddr)  ((ipaddr)        & 0xff)
 #else
-   /* Little endian byte order: 44223311 */
+  /* Little endian byte order: 44223311 */
 
 #  define ip4_addr1(ipaddr)  ((ipaddr)        & 0xff)
 #  define ip4_addr2(ipaddr) (((ipaddr) >>  8) & 0xff)
@@ -576,7 +577,7 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1,
  * Name: net_is_addr_unspecified
  *
  * Description:
- *   Is Ithe IPv6 address the unspecified address?  See RFC 4291 (replaces
+ *   Is the IPv6 address the unspecified address?  See RFC 4291 (replaces
  *   3513).
  *
  ****************************************************************************/
diff --git a/include/nuttx/net/net.h b/include/nuttx/net/net.h
index 33fe2ed..fca8a07 100644
--- a/include/nuttx/net/net.h
+++ b/include/nuttx/net/net.h
@@ -623,8 +623,6 @@ FAR struct socket *sockfd_socket(int sockfd);
  *     The protocol type or the specified protocol is not supported within
  *     this domain.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int psock_socket(int domain, int type, int protocol,
@@ -643,8 +641,6 @@ int psock_socket(int domain, int type, int protocol,
  *  Returns zero (OK) on success.  On failure, it returns a negated errno
  *  value to indicate the nature of the error.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int net_close(int sockfd);
@@ -693,8 +689,6 @@ int psock_close(FAR struct socket *psock);
  *   ENOTSOCK
  *     psock is a descriptor for a file, not a socket.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 struct sockaddr; /* Forward reference. See nuttx/include/sys/socket.h */
@@ -869,8 +863,6 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
  *       Timeout while attempting connection. The server may be too busy
  *       to accept new connections.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr,
@@ -1029,11 +1021,11 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf,
  *   fromlen - The length of the address structure
  *
  * Returned Value:
- *   On success, returns the number of characters sent.  If no data is
+ *   On success, returns the number of characters received.  If no data is
  *   available to be received and the peer has performed an orderly shutdown,
- *   recv() will return 0.  Otherwise, on any failure, a negated errno value
- *   is returned (see comments with send() for a list of appropriate errno
- *   values).
+ *   psock_recvfrom() will return 0.  Otherwise, on any failure, a negated
+ *   errno value is returned (see comments with recvfrom() for a list of
+ *   appropriate errno values).
  *
  ****************************************************************************/
 
@@ -1067,11 +1059,11 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
  *   fromlen - The length of the address structure
  *
  * Returned Value:
- *   On success, returns the number of characters sent.  If no data is
+ *   On success, returns the number of characters received.  If no data is
  *   available to be received and the peer has performed an orderly shutdown,
- *   recv() will return 0.  Otherwise, on any failure, a negated errno value
- *   is returned (see comments with send() for a list of appropriate errno
- *   values).
+ *   nx_recvfrom() will return 0.  Otherwise, on any failure, a negated errno
+ *   value is returned (see comments with recvfrom() for a list of
+ *   appropriate errno values).
  *
  ****************************************************************************/
 
@@ -1086,12 +1078,12 @@ ssize_t nx_recvfrom(int sockfd, FAR void *buf, size_t len, int flags,
  * Name: psock_getsockopt
  *
  * Description:
- *   getsockopt() retrieve thse value for the option specified by the
+ *   getsockopt() retrieve the value for the option specified by the
  *   'option' argument for the socket specified by the 'psock' argument. If
  *   the size of the option value is greater than 'value_len', the value
  *   stored in the object pointed to by the 'value' argument will be silently
  *   truncated. Otherwise, the length pointed to by the 'value_len' argument
- *   will be modified to indicate the actual length of the'value'.
+ *   will be modified to indicate the actual length of the 'value'.
  *
  *   The 'level' argument specifies the protocol level of the option. To
  *   retrieve options at the socket level, specify the level argument as
@@ -1170,8 +1162,6 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option,
  *    Insufficient resources are available in the system to complete the
  *    call.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int psock_setsockopt(FAR struct socket *psock, int level, int option,
diff --git a/net/bluetooth/bluetooth_sockif.c b/net/bluetooth/bluetooth_sockif.c
index 434cbf4..9eeb533 100644
--- a/net/bluetooth/bluetooth_sockif.c
+++ b/net/bluetooth/bluetooth_sockif.c
@@ -345,7 +345,7 @@ static int bluetooth_connect(FAR struct socket *psock,
  *
  * Returned Value:
  *   Returns 0 (OK) on success.  On failure, it returns a negated errno
- *   value.  See accept() for a desrciption of the appropriate error value.
+ *   value.  See accept() for a description of the appropriate error value.
  *
  * Assumptions:
  *   The network is locked.
@@ -709,7 +709,7 @@ static int bluetooth_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/can/can_sockif.c b/net/can/can_sockif.c
index d39934f..5571edf 100644
--- a/net/can/can_sockif.c
+++ b/net/can/can_sockif.c
@@ -454,7 +454,7 @@ static int can_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/icmp/icmp_sockif.c b/net/icmp/icmp_sockif.c
index 2b1e179..152ff58 100644
--- a/net/icmp/icmp_sockif.c
+++ b/net/icmp/icmp_sockif.c
@@ -290,7 +290,7 @@ static int icmp_connect(FAR struct socket *psock,
  *
  * Returned Value:
  *   Returns 0 (OK) on success.  On failure, it returns a negated errno
- *   value.  See accept() for a desrciption of the appropriate error value.
+ *   value.  See accept() for a description of the appropriate error value.
  *
  * Assumptions:
  *   The network is locked.
@@ -421,7 +421,7 @@ static int icmp_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/icmpv6/icmpv6_sockif.c b/net/icmpv6/icmpv6_sockif.c
index 3dbb5c8..0381152 100644
--- a/net/icmpv6/icmpv6_sockif.c
+++ b/net/icmpv6/icmpv6_sockif.c
@@ -290,7 +290,7 @@ static int icmpv6_connect(FAR struct socket *psock,
  *
  * Returned Value:
  *   Returns 0 (OK) on success.  On failure, it returns a negated errno
- *   value.  See accept() for a desrciption of the appropriate error value.
+ *   value.  See accept() for a description of the appropriate error value.
  *
  * Assumptions:
  *   The network is locked.
@@ -421,7 +421,7 @@ static int icmpv6_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/ieee802154/ieee802154_sockif.c b/net/ieee802154/ieee802154_sockif.c
index 713eae0..19661e8 100644
--- a/net/ieee802154/ieee802154_sockif.c
+++ b/net/ieee802154/ieee802154_sockif.c
@@ -344,7 +344,7 @@ static int ieee802154_connect(FAR struct socket *psock,
  *
  * Returned Value:
  *   Returns 0 (OK) on success.  On failure, it returns a negated errno
- *   value.  See accept() for a desrciption of the appropriate error value.
+ *   value.  See accept() for a description of the appropriate error value.
  *
  * Assumptions:
  *   The network is locked.
@@ -594,7 +594,7 @@ static int ieee802154_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c
index 488f2d1..2aafef9 100644
--- a/net/inet/inet_sockif.c
+++ b/net/inet/inet_sockif.c
@@ -578,7 +578,7 @@ static int inet_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
@@ -808,7 +808,7 @@ static int inet_connect(FAR struct socket *psock,
  *
  * Returned Value:
  *   Returns 0 (OK) on success.  On failure, it returns a negated errno
- *   value.  See accept() for a desrciption of the appropriate error value.
+ *   value.  See accept() for a description of the appropriate error value.
  *
  * Assumptions:
  *   The network is locked.
diff --git a/net/local/local.h b/net/local/local.h
index a9c9895..8acf0d6 100644
--- a/net/local/local.h
+++ b/net/local/local.h
@@ -339,7 +339,7 @@ int local_release(FAR struct local_conn_s *conn);
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
@@ -357,7 +357,8 @@ int local_listen(FAR struct socket *psock, int backlog);
  * Input Parameters:
  *   psock    The listening Unix domain socket structure
  *   addr     Receives the address of the connecting client
- *   addrlen  Input: allocated size of 'addr', Return: returned size of 'addr'
+ *   addrlen  Input: allocated size of 'addr'
+ *            Return: returned size of 'addr'
  *   newconn  The new, accepted  Unix domain connection structure
  *
  * Returned Value:
@@ -426,8 +427,8 @@ ssize_t psock_local_send(FAR struct socket *psock, FAR const void *buf,
 
 #ifdef CONFIG_NET_LOCAL_DGRAM
 ssize_t psock_local_sendto(FAR struct socket *psock, FAR const void *buf,
-                           size_t len, int flags, FAR const struct sockaddr *to,
-                           socklen_t tolen);
+                           size_t len, int flags,
+                           FAR const struct sockaddr *to, socklen_t tolen);
 #endif
 
 /****************************************************************************
diff --git a/net/local/local_listen.c b/net/local/local_listen.c
index a8b4810..75f3a42 100644
--- a/net/local/local_listen.c
+++ b/net/local/local_listen.c
@@ -84,7 +84,7 @@ dq_queue_t g_local_listeners;
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/local/local_sockif.c b/net/local/local_sockif.c
index 577eb41..1b589ff 100644
--- a/net/local/local_sockif.c
+++ b/net/local/local_sockif.c
@@ -473,7 +473,7 @@ static int local_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
@@ -601,7 +601,7 @@ static int local_connect(FAR struct socket *psock,
  *
  * Returned Value:
  *   Returns 0 (OK) on success.  On failure, it returns a negated errno
- *   value.  See accept() for a desrciption of the appropriate error value.
+ *   value.  See accept() for a description of the appropriate error value.
  *
  * Assumptions:
  *   The network is locked.
diff --git a/net/netlink/netlink_sockif.c b/net/netlink/netlink_sockif.c
index 34b011a..6ee8c9c 100644
--- a/net/netlink/netlink_sockif.c
+++ b/net/netlink/netlink_sockif.c
@@ -417,7 +417,7 @@ static int netlink_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/pkt/pkt_sockif.c b/net/pkt/pkt_sockif.c
index dbf3e3c..0824c11 100644
--- a/net/pkt/pkt_sockif.c
+++ b/net/pkt/pkt_sockif.c
@@ -314,7 +314,7 @@ static int pkt_connect(FAR struct socket *psock,
  *
  * Returned Value:
  *   Returns 0 (OK) on success.  On failure, it returns a negated errno
- *   value.  See accept() for a desrciption of the appropriate error value.
+ *   value.  See accept() for a description of the appropriate error value.
  *
  * Assumptions:
  *   The network is locked.
@@ -490,7 +490,7 @@ static int pkt_getpeername(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/socket/getsockopt.c b/net/socket/getsockopt.c
index f6c5862..c345d61 100644
--- a/net/socket/getsockopt.c
+++ b/net/socket/getsockopt.c
@@ -67,12 +67,12 @@
  *   the size of the option value is greater than 'value_len', the value
  *   stored in the object pointed to by the 'value' argument will be silently
  *   truncated. Otherwise, the length pointed to by the 'value_len' argument
- *   will be modified to indicate the actual length of the'value'.
+ *   will be modified to indicate the actual length of the 'value'.
  *
  *   The 'level' argument specifies the protocol level of the option. To
  *   retrieve options at the socket level, specify the level argument as
  *   SOL_SOCKET; to retrieve options at the TCP-protocol level, the level
- *   argument is SOL_CP.
+ *   argument is SOL_TCP.
  *
  *   See <sys/socket.h> a complete list of values for the socket-level
  *   'option' argument.  Protocol-specific options are are protocol specific
@@ -302,7 +302,7 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
  *   The 'level' argument specifies the protocol level of the option. To
  *   retrieve options at the socket level, specify the level argument as
  *   SOL_SOCKET; to retrieve options at the TCP-protocol level, the level
- *   argument is SOL_CP.
+ *   argument is SOL_TCP.
  *
  *   See <sys/socket.h> a complete list of values for the socket-level
  *   'option' argument.  Protocol-specific options are are protocol specific
@@ -405,7 +405,7 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option,
  *   The 'level' argument specifies the protocol level of the option. To
  *   retrieve options at the socket level, specify the level argument as
  *   SOL_SOCKET; to retrieve options at the TCP-protocol level, the level
- *   argument is SOL_CP.
+ *   argument is SOL_TCP.
  *
  *   See <sys/socket.h> a complete list of values for the socket-level
  *   'option' argument.  Protocol-specific options are are protocol specific
diff --git a/net/socket/recvfrom.c b/net/socket/recvfrom.c
index 6a01782..c6d8dd3 100644
--- a/net/socket/recvfrom.c
+++ b/net/socket/recvfrom.c
@@ -77,11 +77,11 @@
  *   fromlen - The length of the address structure
  *
  * Returned Value:
- *   On success, returns the number of characters sent.  If no data is
+ *   On success, returns the number of characters received.  If no data is
  *   available to be received and the peer has performed an orderly shutdown,
- *   recv() will return 0.  Otherwise, on any failure, a negated errno value
- *   is returned (see comments with send() for a list of appropriate errno
- *   values).
+ *   psock_recvfrom() will return 0.  Otherwise, on any failure, a negated
+ *   errno value is returned (see comments with recvfrom() for a list of
+ *   appropriate errno values).
  *
  ****************************************************************************/
 
@@ -139,11 +139,11 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
  *   fromlen - The length of the address structure
  *
  * Returned Value:
- *   On success, returns the number of characters sent.  If no data is
+ *   On success, returns the number of characters received.  If no data is
  *   available to be received and the peer has performed an orderly shutdown,
- *   recv() will return 0.  Otherwise, on any failure, a negated errno value
- *   is returned (see comments with send() for a list of appropriate errno
- *   values).
+ *   nx_recvfrom() will return 0.  Otherwise, on any failure, a negated errno
+ *   value is returned (see comments with recvfrom() for a list of
+ *   appropriate errno values).
  *
  ****************************************************************************/
 
diff --git a/net/socket/recvmsg.c b/net/socket/recvmsg.c
index 9ba5de3..ef9b696 100644
--- a/net/socket/recvmsg.c
+++ b/net/socket/recvmsg.c
@@ -75,11 +75,11 @@
  *   flags   - Receive flags
  *
  * Returned Value:
- *   On success, returns the number of characters sent.  If no data is
+ *   On success, returns the number of characters received.  If no data is
  *   available to be received and the peer has performed an orderly shutdown,
- *   recv() will return 0.  Otherwise, on any failure, a negated errno value
- *   is returned (see comments with send() for a list of appropriate errno
- *   values).
+ *   psock_recvmsg() will return 0.  Otherwise, on any failure, a negated
+ *   errno value is returned (see comments with recvmsg() for a list of
+ *   appropriate errno values).
  *
  ****************************************************************************/
 
@@ -150,11 +150,11 @@ ssize_t psock_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg,
  *   flags   - Receive flags
  *
  * Returned Value:
- *   On success, returns the number of characters sent.  If no data is
+ *   On success, returns the number of characters received.  If no data is
  *   available to be received and the peer has performed an orderly shutdown,
- *   recv() will return 0.  Otherwise, on any failure, a negated errno value
- *   is returned (see comments with send() for a list of appropriate errno
- *   values).
+ *   nx_recvmsg() will return 0.  Otherwise, on any failure, a negated errno
+ *   value is returned (see comments with recvmsg() for a list of appropriate
+ *   errno values).
  *
  ****************************************************************************/
 
diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h
index 9f3e193..6c625d6 100644
--- a/net/tcp/tcp.h
+++ b/net/tcp/tcp.h
@@ -1408,7 +1408,7 @@ int tcp_setsockopt(FAR struct socket *psock, int option,
  *   The 'level' argument specifies the protocol level of the option. To
  *   retrieve options at the socket level, specify the level argument as
  *   SOL_SOCKET; to retrieve options at the TCP-protocol level, the level
- *   argument is SOL_CP.
+ *   argument is SOL_TCP.
  *
  *   See <sys/socket.h> a complete list of values for the socket-level
  *   'option' argument.  Protocol-specific options are are protocol specific
diff --git a/net/tcp/tcp_getsockopt.c b/net/tcp/tcp_getsockopt.c
index c07a488..28bdd93 100644
--- a/net/tcp/tcp_getsockopt.c
+++ b/net/tcp/tcp_getsockopt.c
@@ -74,7 +74,7 @@
  *   The 'level' argument specifies the protocol level of the option. To
  *   retrieve options at the socket level, specify the level argument as
  *   SOL_SOCKET; to retrieve options at the TCP-protocol level, the level
- *   argument is SOL_CP.
+ *   argument is SOL_TCP.
  *
  *   See <sys/socket.h> a complete list of values for the socket-level
  *   'option' argument.  Protocol-specific options are are protocol specific
diff --git a/net/usrsock/usrsock.h b/net/usrsock/usrsock.h
index 6fe7663..2bbea25 100644
--- a/net/usrsock/usrsock.h
+++ b/net/usrsock/usrsock.h
@@ -119,12 +119,12 @@ struct usrsock_conn_s
 
   struct
   {
-    sem_t    sem;         /* Request semaphore (only one outstanding request) */
-    uint8_t  xid;         /* Expected message exchange id */
-    bool     inprogress;  /* Request was received but daemon is still processing */
-    uint16_t valuelen;    /* Length of value from daemon */
+    sem_t    sem;               /* Request semaphore (only one outstanding request) */
+    uint8_t  xid;               /* Expected message exchange id */
+    bool     inprogress;        /* Request was received but daemon is still processing */
+    uint16_t valuelen;          /* Length of value from daemon */
     uint16_t valuelen_nontrunc; /* Actual length of value at daemon */
-    int      result;      /* Result for request */
+    int      result;            /* Result for request */
 
     struct
     {
@@ -203,8 +203,8 @@ FAR struct usrsock_conn_s *usrsock_alloc(void);
  * Name: usrsock_free()
  *
  * Description:
- *   Free a usrsock connection structure that is no longer in use. This should
- *   be done by the implementation of close().
+ *   Free a usrsock connection structure that is no longer in use. This
+ *   should be done by the implementation of close().
  *
  ****************************************************************************/
 
@@ -236,8 +236,6 @@ int usrsock_connidx(FAR struct usrsock_conn_s *conn);
  *   Find a connection structure that is the appropriate
  *   connection for usrsock
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 FAR struct usrsock_conn_s *usrsock_active(int16_t usockid);
@@ -256,15 +254,16 @@ int usrsock_setup_request_callback(FAR struct usrsock_conn_s *conn,
  ****************************************************************************/
 
 int usrsock_setup_data_request_callback(FAR struct usrsock_conn_s *conn,
-                                        FAR struct usrsock_data_reqstate_s *pstate,
-                                        FAR devif_callback_event_t event,
-                                        uint16_t flags);
+                                FAR struct usrsock_data_reqstate_s *pstate,
+                                FAR devif_callback_event_t event,
+                                uint16_t flags);
 
 /****************************************************************************
  * Name: usrsock_teardown_request_callback()
  ****************************************************************************/
 
-void usrsock_teardown_request_callback(FAR struct usrsock_reqstate_s *pstate);
+void usrsock_teardown_request_callback(
+                                FAR struct usrsock_reqstate_s *pstate);
 
 /****************************************************************************
  * Name: usrsock_teardown_data_request_callback()
@@ -324,7 +323,8 @@ void usrsockdev_register(void);
  *   domain   (see sys/socket.h)
  *   type     (see sys/socket.h)
  *   protocol (see sys/socket.h)
- *   psock    A pointer to a user allocated socket structure to be initialized.
+ *   psock    A pointer to a user allocated socket structure to be
+ *            initialized.
  *
  * Returned Value:
  *   0 on success; negative error-code on error
@@ -347,11 +347,10 @@ void usrsockdev_register(void);
  *     The protocol type or the specified protocol is not supported within
  *     this domain.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
-int usrsock_socket(int domain, int type, int protocol, FAR struct socket *psock);
+int usrsock_socket(int domain, int type, int protocol,
+                   FAR struct socket *psock);
 
 /****************************************************************************
  * Name: usrsock_close
@@ -365,8 +364,6 @@ int usrsock_socket(int domain, int type, int protocol, FAR struct socket *psock)
  * Returned Value:
  *   0 on success; -1 on error with errno set appropriately.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int usrsock_close(FAR struct usrsock_conn_s *conn);
@@ -375,13 +372,13 @@ int usrsock_close(FAR struct usrsock_conn_s *conn);
  * Name: usrsock_bind
  *
  * Description:
- *   usrsock_bind() gives the socket 'conn' the local address 'addr'. 'addr'
+ *   usrsock_bind() gives the socket 'psock' the local address 'addr'. 'addr'
  *   is 'addrlen' bytes long. Traditionally, this is called "assigning a name
  *   to a socket." When a socket is created with socket, it exists in a name
  *   space (address family) but has no name assigned.
  *
  * Input Parameters:
- *   conn     usrsock socket connection structure
+ *   psock    A reference to the socket structure of the socket to be bound
  *   addr     Socket local address
  *   addrlen  Length of 'addr'
  *
@@ -397,8 +394,6 @@ int usrsock_close(FAR struct usrsock_conn_s *conn);
  *   ENOTSOCK
  *     psock is a descriptor for a file, not a socket.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int usrsock_bind(FAR struct socket *psock,
@@ -412,15 +407,13 @@ int usrsock_bind(FAR struct socket *psock,
  *   Perform a usrsock connection
  *
  * Input Parameters:
- *   psock   A reference to the socket structure of the socket to be connected
+ *   psock   A reference to the socket structure of the socket
  *   addr    The address of the remote server to connect to
  *   addrlen Length of address buffer
  *
  * Returned Value:
  *   None
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int usrsock_connect(FAR struct socket *psock,
@@ -448,7 +441,8 @@ int usrsock_connect(FAR struct socket *psock,
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for a description of the appropriate error
+ *   value.
  *
  ****************************************************************************/
 
@@ -458,16 +452,16 @@ int usrsock_listen(FAR struct socket *psock, int backlog);
  * Name: usrsock_accept
  *
  * Description:
- *   The usrsock_sockif_accept function is used with connection-based socket
+ *   The usrsock_accept function is used with connection-based socket
  *   types (SOCK_STREAM, SOCK_SEQPACKET and SOCK_RDM). It extracts the first
  *   connection request on the queue of pending connections, creates a new
- *   connected socket with mostly the same properties as 'sockfd', and
+ *   connected socket with mostly the same properties as 'psock', and
  *   allocates a new socket descriptor for the socket, which is returned. The
  *   newly created socket is no longer in the listening state. The original
- *   socket 'sockfd' is unaffected by this call.  Per file descriptor flags
- *   are not inherited across an inet_accept.
+ *   socket 'psock' is unaffected by this call.  Per file descriptor flags
+ *   are not inherited across an usrsock_accept.
  *
- *   The 'sockfd' argument is a socket descriptor that has been created with
+ *   The 'psock' argument is a socket descriptor that has been created with
  *   socket(), bound to a local address with bind(), and is listening for
  *   connections after a call to listen().
  *
@@ -477,20 +471,21 @@ int usrsock_listen(FAR struct socket *psock, int backlog);
  *   actual length of the address returned.
  *
  *   If no pending connections are present on the queue, and the socket is
- *   not marked as non-blocking, inet_accept blocks the caller until a
+ *   not marked as non-blocking, usrsock_accept blocks the caller until a
  *   connection is present. If the socket is marked non-blocking and no
- *   pending connections are present on the queue, inet_accept returns
+ *   pending connections are present on the queue, usrsock_accept returns
  *   EAGAIN.
  *
  * Parameters:
  *   psock    Reference to the listening socket structure
  *   addr     Receives the address of the connecting client
- *   addrlen  Input: allocated size of 'addr', Return: returned size of 'addr'
+ *   addrlen  Input: allocated size of 'addr'
+ *            Return: returned size of 'addr'
  *   newsock  Location to return the accepted socket information.
  *
  * Returned Value:
  *   Returns 0 (OK) on success.  On failure, it returns a negated errno
- *   value.  See accept() for a desrciption of the appropriate error value.
+ *   value.  See accept() for a description of the appropriate error value.
  *
  * Assumptions:
  *   The network is locked.
@@ -517,7 +512,8 @@ int usrsock_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
  *
  ****************************************************************************/
 
-int usrsock_poll(FAR struct socket *psock, FAR struct pollfd *fds, bool setup);
+int usrsock_poll(FAR struct socket *psock, FAR struct pollfd *fds,
+                 bool setup);
 
 /****************************************************************************
  * Name: usrsock_sendto
@@ -529,7 +525,7 @@ int usrsock_poll(FAR struct socket *psock, FAR struct pollfd *fds, bool setup);
  *   returned when the socket was not actually connected.
  *
  * Input Parameters:
- *   psock    A reference to the socket structure of the socket to be connected
+ *   psock    A reference to the socket structure of the socket
  *   buf      Data to send
  *   len      Length of data to send
  *   flags    Send flags (ignored)
@@ -537,9 +533,8 @@ int usrsock_poll(FAR struct socket *psock, FAR struct pollfd *fds, bool setup);
  *   tolen    The length of the address structure
  *
  * Returned Value:
- *   None
- *
- * Assumptions:
+ *   On success, returns the number of characters sent.  On any failure, a
+ *   negated errno value is returned.
  *
  ****************************************************************************/
 
@@ -560,13 +555,19 @@ ssize_t usrsock_sendto(FAR struct socket *psock, FAR const void *buf,
  *   on return to indicate the actual size of the address stored there.
  *
  * Input Parameters:
- *   psock    A pointer to a NuttX-specific, internal socket structure
+ *   psock    A reference to the socket structure of the socket
  *   buf      Buffer to receive data
  *   len      Length of buffer
  *   flags    Receive flags (ignored)
  *   from     Address of source (may be NULL)
  *   fromlen  The length of the address structure
  *
+ * Returned Value:
+ *   On success, returns the number of characters received.  If no data is
+ *   available to be received and the peer has performed an orderly shutdown,
+ *   recvfrom() will return 0.  Otherwise, on any failure, a negated errno
+ *   value is returned.
+ *
  ****************************************************************************/
 
 ssize_t usrsock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
@@ -577,12 +578,13 @@ ssize_t usrsock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
  * Name: usrsock_getsockopt
  *
  * Description:
- *   getsockopt() retrieve thse value for the option specified by the
- *   'option' argument for the socket specified by the 'psock' argument. If
- *   the size of the option value is greater than 'value_len', the value
- *   stored in the object pointed to by the 'value' argument will be silently
- *   truncated. Otherwise, the length pointed to by the 'value_len' argument
- *   will be modified to indicate the actual length of the'value'.
+ *   getsockopt() retrieve the value for the option specified by the
+ *   'option' argument at the protocol level specified by the 'level'
+ *   argument. If the size of the option value is greater than 'value_len',
+ *   the value stored in the object pointed to by the 'value' argument will
+ *   be silently truncated. Otherwise, the length pointed to by the
+ *   'value_len' argument will be modified to indicate the actual length
+ *   of the 'value'.
  *
  *   The 'level' argument specifies the protocol level of the option. To
  *   retrieve options at the socket level, specify the level argument as
@@ -599,8 +601,9 @@ ssize_t usrsock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
  *
  ****************************************************************************/
 
-int usrsock_getsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
-                       FAR void *value, FAR socklen_t *value_len);
+int usrsock_getsockopt(FAR struct usrsock_conn_s *conn, int level,
+                       int option, FAR void *value,
+                       FAR socklen_t *value_len);
 
 /****************************************************************************
  * Name: usrsock_setsockopt
@@ -608,7 +611,7 @@ int usrsock_getsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
  * Description:
  *   psock_setsockopt() sets the option specified by the 'option' argument,
  *   at the protocol level specified by the 'level' argument, to the value
- *   pointed to by the 'value' argument for the socket on the 'psock' argument.
+ *   pointed to by the 'value' argument for the usrsock connection.
  *
  *   The 'level' argument specifies the protocol level of the option. To set
  *   options at the socket level, specify the level argument as SOL_SOCKET.
@@ -624,8 +627,9 @@ int usrsock_getsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
  *
  ****************************************************************************/
 
-int usrsock_setsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
-                       FAR const void *value, FAR socklen_t value_len);
+int usrsock_setsockopt(FAR struct usrsock_conn_s *conn, int level,
+                       int option, FAR const void *value,
+                       FAR socklen_t value_len);
 
 /****************************************************************************
  * Name: usrsock_getsockname
@@ -643,7 +647,7 @@ int usrsock_setsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
  *   the object pointed to by address is unspecified.
  *
  * Input Parameters:
- *   conn     usrsock socket connection structure
+ *   psock    A reference to the socket structure of the socket
  *   addr     sockaddr structure to receive data [out]
  *   addrlen  Length of sockaddr structure [in/out]
  *
@@ -668,7 +672,7 @@ int usrsock_getsockname(FAR struct socket *psock,
  *   the object pointed to by address is unspecified.
  *
  * Input Parameters:
- *   conn     usrsock socket connection structure
+ *   psock    A reference to the socket structure of the socket
  *   addr     sockaddr structure to receive data [out]
  *   addrlen  Length of sockaddr structure [in/out]
  *
@@ -681,16 +685,19 @@ int usrsock_getpeername(FAR struct socket *psock,
  * Name: usrsock_ioctl
  *
  * Description:
- *   The usrsock_ioctl() function performs network device specific operations.
+ *   The usrsock_ioctl() function performs network device specific
+ *   operations.
  *
  * Parameters:
- *   psock    A pointer to a NuttX-specific, internal socket structure
+ *   psock    A reference to the socket structure of the socket
  *   cmd      The ioctl command
  *   arg      The argument of the ioctl cmd
+ *   arglen   The length of 'arg'
  *
  ****************************************************************************/
 
-int usrsock_ioctl(FAR struct socket *psock, int cmd, FAR void *arg, size_t arglen);
+int usrsock_ioctl(FAR struct socket *psock, int cmd, FAR void *arg,
+                  size_t arglen);
 
 #undef EXTERN
 #ifdef __cplusplus
diff --git a/net/usrsock/usrsock_accept.c b/net/usrsock/usrsock_accept.c
index cab53f0..9133f0a 100644
--- a/net/usrsock/usrsock_accept.c
+++ b/net/usrsock/usrsock_accept.c
@@ -172,16 +172,16 @@ static int do_accept_request(FAR struct usrsock_conn_s *conn,
  * Name: usrsock_accept
  *
  * Description:
- *   The usrsock_sockif_accept function is used with connection-based socket
+ *   The usrsock_accept function is used with connection-based socket
  *   types (SOCK_STREAM, SOCK_SEQPACKET and SOCK_RDM). It extracts the first
  *   connection request on the queue of pending connections, creates a new
- *   connected socket with mostly the same properties as 'sockfd', and
+ *   connected socket with mostly the same properties as 'psock', and
  *   allocates a new socket descriptor for the socket, which is returned. The
  *   newly created socket is no longer in the listening state. The original
- *   socket 'sockfd' is unaffected by this call.  Per file descriptor flags
- *   are not inherited across an inet_accept.
+ *   socket 'psock' is unaffected by this call.  Per file descriptor flags
+ *   are not inherited across an usrsock_accept.
  *
- *   The 'sockfd' argument is a socket descriptor that has been created with
+ *   The 'psock' argument is a socket descriptor that has been created with
  *   socket(), bound to a local address with bind(), and is listening for
  *   connections after a call to listen().
  *
@@ -191,9 +191,9 @@ static int do_accept_request(FAR struct usrsock_conn_s *conn,
  *   actual length of the address returned.
  *
  *   If no pending connections are present on the queue, and the socket is
- *   not marked as non-blocking, inet_accept blocks the caller until a
+ *   not marked as non-blocking, usrsock_accept blocks the caller until a
  *   connection is present. If the socket is marked non-blocking and no
- *   pending connections are present on the queue, inet_accept returns
+ *   pending connections are present on the queue, usrsock_accept returns
  *   EAGAIN.
  *
  * Parameters:
diff --git a/net/usrsock/usrsock_bind.c b/net/usrsock/usrsock_bind.c
index 93aa7b7..84133d6 100644
--- a/net/usrsock/usrsock_bind.c
+++ b/net/usrsock/usrsock_bind.c
@@ -136,13 +136,13 @@ static int do_bind_request(FAR struct usrsock_conn_s *conn,
  * Name: usrsock_bind
  *
  * Description:
- *   usrsock_bind() gives the socket 'conn' the local address 'addr'. 'addr'
+ *   usrsock_bind() gives the socket 'psock' the local address 'addr'. 'addr'
  *   is 'addrlen' bytes long. Traditionally, this is called "assigning a name
  *   to a socket." When a socket is created with socket, it exists in a name
  *   space (address family) but has no name assigned.
  *
  * Input Parameters:
- *   conn     usrsock socket connection structure
+ *   psock    A reference to the socket structure of the socket to be bound
  *   addr     Socket local address
  *   addrlen  Length of 'addr'
  *
@@ -158,8 +158,6 @@ static int do_bind_request(FAR struct usrsock_conn_s *conn,
  *   ENOTSOCK
  *     psock is a descriptor for a file, not a socket.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int usrsock_bind(FAR struct socket *psock,
@@ -201,7 +199,7 @@ int usrsock_bind(FAR struct socket *psock,
       goto errout_unlock;
     }
 
-  /* Request user-space daemon to close socket. */
+  /* Request user-space daemon to bind address. */
 
   ret = do_bind_request(conn, addr, addrlen);
   if (ret >= 0)
diff --git a/net/usrsock/usrsock_conn.c b/net/usrsock/usrsock_conn.c
index 0d6261a..0d79124 100644
--- a/net/usrsock/usrsock_conn.c
+++ b/net/usrsock/usrsock_conn.c
@@ -216,8 +216,6 @@ int usrsock_connidx(FAR struct usrsock_conn_s *conn)
  *   Find a connection structure that is the appropriate
  *   connection for usrsock
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 FAR struct usrsock_conn_s *usrsock_active(int16_t usockid)
diff --git a/net/usrsock/usrsock_getpeername.c b/net/usrsock/usrsock_getpeername.c
index 54ef03f..7cc01bd 100644
--- a/net/usrsock/usrsock_getpeername.c
+++ b/net/usrsock/usrsock_getpeername.c
@@ -147,7 +147,7 @@ static int do_getpeername_request(FAR struct usrsock_conn_s *conn,
  *   the object pointed to by address is unspecified.
  *
  * Parameters:
- *   conn     usrsock socket connection structure
+ *   psock    A reference to the socket structure of the socket
  *   addr     sockaddr structure to receive data [out]
  *   addrlen  Length of sockaddr structure [in/out]
  *
diff --git a/net/usrsock/usrsock_getsockname.c b/net/usrsock/usrsock_getsockname.c
index bb64823..da0d075 100644
--- a/net/usrsock/usrsock_getsockname.c
+++ b/net/usrsock/usrsock_getsockname.c
@@ -162,7 +162,7 @@ static int do_getsockname_request(FAR struct usrsock_conn_s *conn,
  *   the object pointed to by address is unspecified.
  *
  * Input Parameters:
- *   conn     usrsock socket connection structure
+ *   psock    A reference to the socket structure of the socket
  *   addr     sockaddr structure to receive data [out]
  *   addrlen  Length of sockaddr structure [in/out]
  *
@@ -211,7 +211,7 @@ int usrsock_getsockname(FAR struct socket *psock,
 
   usrsock_setup_datain(conn, inbufs, ARRAY_SIZE(inbufs));
 
-  /* Request user-space daemon to close socket. */
+  /* Request user-space daemon to handle request. */
 
   ret = do_getsockname_request(conn, *addrlen);
   if (ret >= 0)
diff --git a/net/usrsock/usrsock_getsockopt.c b/net/usrsock/usrsock_getsockopt.c
index 7946baa..0632d41 100644
--- a/net/usrsock/usrsock_getsockopt.c
+++ b/net/usrsock/usrsock_getsockopt.c
@@ -161,12 +161,13 @@ static int do_getsockopt_request(FAR struct usrsock_conn_s *conn, int level,
  * Name: usrsock_getsockopt
  *
  * Description:
- *   getsockopt() retrieve thse value for the option specified by the
- *   'option' argument for the socket specified by the 'psock' argument. If
- *   the size of the option value is greater than 'value_len', the value
- *   stored in the object pointed to by the 'value' argument will be silently
- *   truncated. Otherwise, the length pointed to by the 'value_len' argument
- *   will be modified to indicate the actual length of the'value'.
+ *   getsockopt() retrieve the value for the option specified by the
+ *   'option' argument at the protocol level specified by the 'level'
+ *   argument. If the size of the option value is greater than 'value_len',
+ *   the value stored in the object pointed to by the 'value' argument will
+ *   be silently truncated. Otherwise, the length pointed to by the
+ *   'value_len' argument will be modified to indicate the actual length
+ *   of the 'value'.
  *
  *   The 'level' argument specifies the protocol level of the option. To
  *   retrieve options at the socket level, specify the level argument as
@@ -225,7 +226,7 @@ int usrsock_getsockopt(FAR struct usrsock_conn_s *conn,
 
   usrsock_setup_datain(conn, inbufs, ARRAY_SIZE(inbufs));
 
-  /* Request user-space daemon to close socket. */
+  /* Request user-space daemon to handle request. */
 
   ret = do_getsockopt_request(conn, level, option, *value_len);
   if (ret >= 0)
diff --git a/net/usrsock/usrsock_ioctl.c b/net/usrsock/usrsock_ioctl.c
index 137b9e7..0b54707 100644
--- a/net/usrsock/usrsock_ioctl.c
+++ b/net/usrsock/usrsock_ioctl.c
@@ -140,9 +140,10 @@ static int do_ioctl_request(FAR struct usrsock_conn_s *conn, int cmd,
  *   This function performs network device specific operations.
  *
  * Parameters:
- *   psock    A pointer to a NuttX-specific, internal socket structure
+ *   psock    A reference to the socket structure of the socket
  *   cmd      The ioctl command
  *   arg      The argument of the ioctl cmd
+ *   arglen   The length of 'arg'
  *
  ****************************************************************************/
 
@@ -187,7 +188,7 @@ int usrsock_ioctl(FAR struct socket *psock, int cmd, FAR void *arg,
   inbufs[0].iov_len = arglen;
   usrsock_setup_datain(conn, inbufs, ARRAY_SIZE(inbufs));
 
-  /* Request user-space daemon to close socket. */
+  /* Request user-space daemon to handle ioctl. */
 
   ret = do_ioctl_request(conn, cmd, arg, arglen);
   if (ret >= 0)
diff --git a/net/usrsock/usrsock_listen.c b/net/usrsock/usrsock_listen.c
index 963a623..1d691ba 100644
--- a/net/usrsock/usrsock_listen.c
+++ b/net/usrsock/usrsock_listen.c
@@ -135,7 +135,7 @@ static int do_listen_request(FAR struct usrsock_conn_s *conn, int backlog)
  *
  * Returned Value:
  *   On success, zero is returned. On error, a negated errno value is
- *   returned.  See list() for the set of appropriate error values.
+ *   returned.  See listen() for the set of appropriate error values.
  *
  ****************************************************************************/
 
diff --git a/net/usrsock/usrsock_recvfrom.c b/net/usrsock/usrsock_recvfrom.c
index 5df6de0..b3a1ad3 100644
--- a/net/usrsock/usrsock_recvfrom.c
+++ b/net/usrsock/usrsock_recvfrom.c
@@ -206,13 +206,19 @@ static int do_recvfrom_request(FAR struct usrsock_conn_s *conn,
  *   on return to indicate the actual size of the address stored there.
  *
  * Input Parameters:
- *   psock    A pointer to a NuttX-specific, internal socket structure
+ *   psock    A reference to the socket structure of the socket
  *   buf      Buffer to receive data
  *   len      Length of buffer
  *   flags    Receive flags (ignored)
  *   from     Address of source (may be NULL)
  *   fromlen  The length of the address structure
  *
+ * Returned Value:
+ *   On success, returns the number of characters received.  If no data is
+ *   available to be received and the peer has performed an orderly shutdown,
+ *   recvfrom() will return 0.  Otherwise, on any failure, a negated errno
+ *   value is returned.
+ *
  ****************************************************************************/
 
 ssize_t usrsock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
diff --git a/net/usrsock/usrsock_sendto.c b/net/usrsock/usrsock_sendto.c
index 2312232..583de69 100644
--- a/net/usrsock/usrsock_sendto.c
+++ b/net/usrsock/usrsock_sendto.c
@@ -200,13 +200,17 @@ static int do_sendto_request(FAR struct usrsock_conn_s *conn,
  *   returned when the socket was not actually connected.
  *
  * Input Parameters:
- *   psock    A pointer to a NuttX-specific, internal socket structure
+ *   psock    A reference to the socket structure of the socket
  *   buf      Data to send
  *   len      Length of data to send
  *   flags    Send flags (ignored)
  *   to       Address of recipient
  *   tolen    The length of the address structure
  *
+ * Returned Value:
+ *   On success, returns the number of characters sent.  On any failure, a
+ *   negated errno value is returned.
+ *
  ****************************************************************************/
 
 ssize_t usrsock_sendto(FAR struct socket *psock, FAR const void *buf,
diff --git a/net/usrsock/usrsock_setsockopt.c b/net/usrsock/usrsock_setsockopt.c
index be46f50..092e26b 100644
--- a/net/usrsock/usrsock_setsockopt.c
+++ b/net/usrsock/usrsock_setsockopt.c
@@ -157,8 +157,7 @@ static int do_setsockopt_request(FAR struct usrsock_conn_s *conn,
  * Description:
  *   psock_setsockopt() sets the option specified by the 'option' argument,
  *   at the protocol level specified by the 'level' argument, to the value
- *   pointed to by the 'value' argument for the socket on the 'psock'
- *   argument.
+ *   pointed to by the 'value' argument for the usrsock connection.
  *
  *   The 'level' argument specifies the protocol level of the option. To set
  *   options at the socket level, specify the level argument as SOL_SOCKET.
@@ -212,7 +211,7 @@ int usrsock_setsockopt(FAR struct usrsock_conn_s *conn,
       goto errout_unlock;
     }
 
-  /* Request user-space daemon to close socket. */
+  /* Request user-space daemon to handle request. */
 
   ret = do_setsockopt_request(conn, level, option, value, value_len);
   if (ret >= 0)
diff --git a/net/usrsock/usrsock_socket.c b/net/usrsock/usrsock_socket.c
index dec3961..a3e4c3c 100644
--- a/net/usrsock/usrsock_socket.c
+++ b/net/usrsock/usrsock_socket.c
@@ -190,8 +190,6 @@ static int do_socket_request(FAR struct usrsock_conn_s *conn, int domain,
  *     The protocol type or the specified protocol is not supported within
  *     this domain.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 int usrsock_socket(int domain, int type, int protocol,
diff --git a/net/usrsock/usrsock_sockif.c b/net/usrsock/usrsock_sockif.c
index 4a83e88..a228631 100644
--- a/net/usrsock/usrsock_sockif.c
+++ b/net/usrsock/usrsock_sockif.c
@@ -96,7 +96,7 @@ const struct sock_intf_s g_usrsock_sockif =
  ****************************************************************************/
 
 /****************************************************************************
- * Name: inet_setup
+ * Name: usrsock_sockif_setup
  *
  * Description:
  *   Called for socket() to verify that the provided socket type and
@@ -263,8 +263,6 @@ static ssize_t usrsock_sockif_send(FAR struct socket *psock,
  * Returned Value:
  *   0 on success; -1 on error with errno set appropriately.
  *
- * Assumptions:
- *
  ****************************************************************************/
 
 static int usrsock_sockif_close(FAR struct socket *psock)