You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/03 13:35:28 UTC

[incubator-nuttx] branch pr32 updated: Fix stm32l4_otgfshost.c: error: 'ret' undeclared (#32)

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

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


The following commit(s) were added to refs/heads/pr32 by this push:
     new dadf191  Fix stm32l4_otgfshost.c: error: 'ret' undeclared (#32)
dadf191 is described below

commit dadf191cfc4a5bad91deb99cc8745288e277321e
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jan 3 07:35:20 2020 -0600

    Fix stm32l4_otgfshost.c: error: 'ret' undeclared (#32)
    
    result by commit 6a3c2aded683e8284e793eb3ee8793d2960ae000
    
    Change-Id: I68ba79417d8da102da8d91c74496961aef242dd9
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/lc823450/lc823450_usbdev.c  | 2 +-
 arch/arm/src/sama5/sam_tsd.c             | 4 ----
 arch/arm/src/stm32/stm32_adc.c           | 4 ++--
 arch/arm/src/stm32l4/stm32l4_otgfshost.c | 1 +
 drivers/input/ads7843e.c                 | 4 ----
 drivers/usbhost/usbhost_hidmouse.c       | 4 ----
 6 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/arm/src/lc823450/lc823450_usbdev.c b/arch/arm/src/lc823450/lc823450_usbdev.c
index ef26dab..1363641 100644
--- a/arch/arm/src/lc823450/lc823450_usbdev.c
+++ b/arch/arm/src/lc823450/lc823450_usbdev.c
@@ -1925,7 +1925,7 @@ int usbdev_msc_epread(void *buf, int len)
            CONFIG_USBMSC_EPBULKOUT  << USB_DMAC_DMAEP_SHIFT |
            USB_DMAC_START,
            USB_DMAC1);
-           nxsem_wait(&dma_wait);
+  nxsem_wait(&dma_wait);
 
   return 0;
 }
diff --git a/arch/arm/src/sama5/sam_tsd.c b/arch/arm/src/sama5/sam_tsd.c
index bd45d34..e8126bc 100644
--- a/arch/arm/src/sama5/sam_tsd.c
+++ b/arch/arm/src/sama5/sam_tsd.c
@@ -378,10 +378,6 @@ static int sam_tsd_waitsample(struct sam_tsd_s *priv, struct sam_sample_s *sampl
 
       if (ret < 0)
         {
-          /* If we are awakened by a signal, then we need to return
-           * the failure now.
-           */
-
           ierr("ERROR: nxsem_wait: %d\n", ret);
           goto errout;
         }
diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c
index e792760..c887e30 100644
--- a/arch/arm/src/stm32/stm32_adc.c
+++ b/arch/arm/src/stm32/stm32_adc.c
@@ -1854,7 +1854,7 @@ static void adc_inj_startconv(FAR struct stm32_dev_s *priv, bool enable)
 #ifdef HAVE_ADC_CMN_DATA
 static int adccmn_lock(FAR struct stm32_dev_s *priv, bool lock)
 {
-  int ret = OK;
+  int ret;
 
   if (lock)
     {
@@ -1862,7 +1862,7 @@ static int adccmn_lock(FAR struct stm32_dev_s *priv, bool lock)
     }
   else
     {
-      nxsem_post(&priv->cmn->lock);
+      ret = nxsem_post(&priv->cmn->lock);
     }
 
   return ret;
diff --git a/arch/arm/src/stm32l4/stm32l4_otgfshost.c b/arch/arm/src/stm32l4/stm32l4_otgfshost.c
index 247a737..df35a6b 100644
--- a/arch/arm/src/stm32l4/stm32l4_otgfshost.c
+++ b/arch/arm/src/stm32l4/stm32l4_otgfshost.c
@@ -1079,6 +1079,7 @@ static int stm32l4_chan_wait(FAR struct stm32l4_usbhost_s *priv,
                              FAR struct stm32l4_chan_s *chan)
 {
   irqstate_t flags;
+  int ret;
 
   /* Disable interrupts so that the following operations will be atomic.  On
    * the OTG FS global interrupt needs to be disabled.  However, here we disable
diff --git a/drivers/input/ads7843e.c b/drivers/input/ads7843e.c
index 10cb507..2c752ed 100644
--- a/drivers/input/ads7843e.c
+++ b/drivers/input/ads7843e.c
@@ -418,10 +418,6 @@ static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv,
 
       if (ret < 0)
         {
-          /* If we are awakened by a signal, then we need to return
-           * the failure now.
-           */
-
           ierr("ERROR: nxsem_wait: %d\n", ret);
           goto errout;
         }
diff --git a/drivers/usbhost/usbhost_hidmouse.c b/drivers/usbhost/usbhost_hidmouse.c
index a1601ab..751db6f 100644
--- a/drivers/usbhost/usbhost_hidmouse.c
+++ b/drivers/usbhost/usbhost_hidmouse.c
@@ -1354,10 +1354,6 @@ static int usbhost_waitsample(FAR struct usbhost_state_s *priv,
 
       if (ret < 0)
         {
-          /* If we are awakened by a signal, then we need to return
-           * the failure now.
-           */
-
           ierr("ERROR: nxsem_wait: %d\n", ret);
           goto errout;
         }