From commits-return-7410-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Thu Apr 16 17:50:35 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 83A98180675 for ; Thu, 16 Apr 2020 19:50:34 +0200 (CEST) Received: (qmail 37928 invoked by uid 500); 16 Apr 2020 17:50:34 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 37913 invoked by uid 99); 16 Apr 2020 17:50:33 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Apr 2020 17:50:33 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 7F8BC819F2; Thu, 16 Apr 2020 17:50:33 +0000 (UTC) Date: Thu, 16 Apr 2020 17:50:37 +0000 To: "commits@nuttx.apache.org" Subject: [incubator-nuttx] 04/04: Fix nxstyle warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: gnutt@apache.org In-Reply-To: <158705943302.27758.16266290982180978763@gitbox.apache.org> References: <158705943302.27758.16266290982180978763@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-nuttx X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: b432ae559882efe6741c7fe5d3321d5f41b46b4f X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20200416175033.7F8BC819F2@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. gnutt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git commit b432ae559882efe6741c7fe5d3321d5f41b46b4f Author: Xiang Xiao AuthorDate: Thu Apr 16 22:02:11 2020 +0800 Fix nxstyle warning --- net/netdev/netdev_ioctl.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c index bf1ea5e..4e27251 100644 --- a/net/netdev/netdev_ioctl.c +++ b/net/netdev/netdev_ioctl.c @@ -305,8 +305,8 @@ static void ioctl_get_ipv4addr(FAR struct sockaddr *outaddr, ****************************************************************************/ #ifdef CONFIG_NET_IPv4 -static void inline ioctl_get_ipv4broadcast(FAR struct sockaddr *outaddr, - in_addr_t inaddr, in_addr_t netmask) +static void ioctl_get_ipv4broadcast(FAR struct sockaddr *outaddr, + in_addr_t inaddr, in_addr_t netmask) { FAR struct sockaddr_in *dest = (FAR struct sockaddr_in *)outaddr; dest->sin_family = AF_INET; @@ -378,7 +378,8 @@ static void ioctl_set_ipv4addr(FAR in_addr_t *outaddr, static void ioctl_set_ipv6addr(FAR net_ipv6addr_t outaddr, FAR const struct sockaddr_storage *inaddr) { - FAR const struct sockaddr_in6 *src = (FAR const struct sockaddr_in6 *)inaddr; + FAR const struct sockaddr_in6 *src = + (FAR const struct sockaddr_in6 *)inaddr; memcpy(outaddr, src->sin6_addr.in6_u.u6_addr8, 16); } #endif @@ -511,7 +512,7 @@ static int netdev_iee802154_ioctl(FAR struct socket *psock, int cmd, * Name: netdev_pktradio_ioctl * * Description: - * Perform non-IEEE802.15.4 packet radio network device specific operations. + * Perform non-IEEE802.15.4 packet radio network device specific operation. * * Input Parameters: * psock - Socket structure @@ -605,7 +606,7 @@ static int netdev_wifr_ioctl(FAR struct socket *psock, int cmd, { /* Just forward the IOCTL to the wireless driver */ - ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)req)); + ret = dev->d_ioctl(dev, cmd, (unsigned long)(uintptr_t)req); } } @@ -1065,8 +1066,9 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, dev = netdev_ifr_dev(req); if (dev && dev->d_ioctl) { - struct mii_ioctl_notify_s *notify = &req->ifr_ifru.ifru_mii_notify; - ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)notify)); + struct mii_ioctl_notify_s *notify = + &req->ifr_ifru.ifru_mii_notify; + ret = dev->d_ioctl(dev, cmd, (unsigned long)(uintptr_t)notify); } } break; @@ -1079,8 +1081,10 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, dev = netdev_ifr_dev(req); if (dev && dev->d_ioctl) { - struct mii_ioctl_data_s *mii_data = &req->ifr_ifru.ifru_mii_data; - ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)mii_data)); + struct mii_ioctl_data_s *mii_data = + &req->ifr_ifru.ifru_mii_data; + ret = dev->d_ioctl(dev, cmd, + (unsigned long)(uintptr_t)mii_data); } } break; @@ -1243,9 +1247,10 @@ static int netdev_arp_ioctl(FAR struct socket *psock, int cmd, FAR struct sockaddr_in *addr = (FAR struct sockaddr_in *)&req->arp_pa; - /* Find the existing ARP table entry for this protocol address. */ + /* Find the existing ARP entry for this protocol address. */ - FAR struct arp_entry_s *entry = arp_lookup(addr->sin_addr.s_addr); + FAR struct arp_entry_s *entry = + arp_lookup(addr->sin_addr.s_addr); if (entry != NULL) { /* The ARP table is fixed size; an entry is deleted @@ -1613,8 +1618,6 @@ int psock_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) return -EBADF; } - /* Execute the command. First check for a standard network IOCTL command. */ - #ifdef CONFIG_NET_USRSOCK /* Check for a USRSOCK ioctl command */ @@ -1624,7 +1627,7 @@ int psock_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) { /* Check for a standard network IOCTL command. */ - ret = netdev_ifr_ioctl(psock, cmd, (FAR struct ifreq *)((uintptr_t)arg)); + ret = netdev_ifr_ioctl(psock, cmd, (FAR struct ifreq *)(uintptr_t)arg); } #if defined(CONFIG_NETDEV_IOCTL) && defined(CONFIG_NETDEV_WIRELESS_IOCTL) @@ -1672,7 +1675,7 @@ int psock_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) if (ret == -ENOTTY) { ret = netdev_imsf_ioctl(psock, cmd, - (FAR struct ip_msfilter *)((uintptr_t)arg)); + (FAR struct ip_msfilter *)(uintptr_t)arg); } #endif @@ -1682,7 +1685,7 @@ int psock_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) if (ret == -ENOTTY) { ret = netdev_arp_ioctl(psock, cmd, - (FAR struct arpreq *)((uintptr_t)arg)); + (FAR struct arpreq *)(uintptr_t)arg); } #endif @@ -1692,7 +1695,7 @@ int psock_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) if (ret == -ENOTTY) { ret = netdev_rt_ioctl(psock, cmd, - (FAR struct rtentry *)((uintptr_t)arg)); + (FAR struct rtentry *)(uintptr_t)arg); } #endif