nuttx: Fix the nightly build warning

lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types]
  142 |   .send              = spi_send,
      |                        ^~~~~~~~
lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send')

In file included from ieee802154/mac802154_bind.c:49:
ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode':
ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  788 |                         (FAR const union ieee802154_attr_u *)&mode);
      |                                          ^~~~~~~~~~~~~~~~~

chip/stm32_hciuart.c: In function 'hciuart_read':
chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value]
 2104 |                       ntotal == (ssize_t)ret;
      |                       ~~~~~~~^~~~~~~~~~~~~~~

wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler':
wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  579 |   type = bcmf_getle32(&event->type);
      |                       ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  580 |   status = bcmf_getle32(&event->status);
      |                         ^~~~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler':
wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  619 |   status = bcmf_getle32(&event->status);
      |                         ^~~~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  620 |   escan_result_len = bcmf_getle32(&event->len);
      |                                   ^~~~~~~~~~~
wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame':
wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  166 |   event_id = bcmf_getle32(&event_msg->event.type);
      |                           ^~~~~~~~~~~~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct':
wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  157 |   ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp);
      |   ^~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended':
wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  239 |           ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
      |           ^~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  244 |           ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
      |           ^~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  257 |       ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
      |       ^~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  265 |   SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp);
      |   ^~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~

chip/stm32_adc.c: In function 'adc_reset':
chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable]
 2860 |   int ret;
      |       ^~~
chip/stm32_adc.c: In function 'adc_shutdown':
chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable]
 3044 |   int ret;
      |       ^~~

chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function]
  722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wireless/gs2200m.c: In function 'gs2200m_read':
wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types]
  727 |   ret = nxsem_wait(dev);
      |                    ^~~
      |                    |
      |                    struct gs2200m_dev_s *

.config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE

platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined
   69 | inline bool cxd56_audio_clock_is_enabled(void);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined
   68 | inline void cxd56_audio_clock_disable(void);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined
   67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~

chip/stm32_adc.c: In function 'adc_reset':
chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable]
 1348 |   int ret;
      |       ^~~
chip/stm32_adc.c: In function 'adc_shutdown':
chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable]
 1496 |   int ret;
      |       ^~~

chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function]
  729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character
  147 | #  warning OOK support is not complete, RX+TX doesn't work yet!
      |                                                    ^

str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type
                                               'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types]
  435 |   .send              = spi_send,
      |                        ^~~~~~~~
str71_spi.c:435:24: note: (near initialization for 'g_spiops.send')

chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function]
 static inline uint32_t pic32mx_getreg(uintptr_t uart_base,
                        ^
chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function]
 static inline bool pic32mx_value(uint16_t pinset)
                    ^
chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function]
 static inline bool pic32mz_value(pinset_t pinset)
                    ^
chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function]
 pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno)
 ^

mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged':
mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void
       return ret;
       ^

In file included from partition/fs_partition.c:42:0:
partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function]
 static inline int read_partition_block(FAR struct partition_state_s *state,
                   ^

local/local_netpoll.c: In function 'local_pollsetup':
local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label]
 pollerr:
 ^~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
This commit is contained in:
Xiang Xiao 2020-04-12 21:52:28 +08:00 committed by patacongo
parent 716f529bae
commit b22e3b9e28
27 changed files with 73 additions and 304 deletions

View File

@ -2857,7 +2857,6 @@ static void adc_reset(FAR struct adc_dev_s *dev)
{
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;
irqstate_t flags;
int ret;
ainfo("intf: %d\n", priv->intf);
flags = enter_critical_section();
@ -2879,8 +2878,7 @@ static void adc_reset(FAR struct adc_dev_s *dev)
/* Only if this is the first initialzied ADC instance in the ADC block */
#ifdef HAVE_ADC_CMN_DATA
ret = adccmn_lock(priv, true);
if (ret < 0)
if (adccmn_lock(priv, true) < 0)
{
return;
}
@ -3041,7 +3039,6 @@ static int adc_setup(FAR struct adc_dev_s *dev)
static void adc_shutdown(FAR struct adc_dev_s *dev)
{
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;
int ret;
/* Disable ADC */
@ -3059,8 +3056,7 @@ static void adc_shutdown(FAR struct adc_dev_s *dev)
#endif
#ifdef HAVE_ADC_CMN_DATA
ret = adccmn_lock(priv, true);
if (ret < 0)
if (adccmn_lock(priv, true) < 0)
{
return;
}

View File

@ -2101,7 +2101,7 @@ static ssize_t hciuart_read(const struct btuart_lowerhalf_s *lower,
ret = nxsem_wait_uninterruptible(&state->rxwait);
if (ret < 0)
{
ntotal == (ssize_t)ret;
ntotal = (ssize_t)ret;
break;
}
}

View File

@ -289,8 +289,6 @@ static inline void stm32_i2c_putreg(FAR struct stm32_i2c_priv_s *priv,
static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
uint8_t offset, uint16_t clearbits,
uint16_t setbits);
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv);
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv);
#ifdef CONFIG_STM32_I2C_DYNTIMEO
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
@ -505,33 +503,6 @@ static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
modifyreg16(priv->config->base + offset, clearbits, setbits);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv)
{
return nxsem_wait(&priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait_noncancelable
*
* Description:
* Take the exclusive access, waiting as necessary
*
************************************************************************************/
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv)
{
return nxsem_wait_uninterruptible(&priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_tousecs
*
@ -1604,7 +1575,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev,
/* Ensure that address or flags don't change meanwhile */
ret = stm32_i2c_sem_wait(priv);
ret = nxsem_wait(&priv->sem_excl);
if (ret < 0)
{
return ret;
@ -1826,7 +1797,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s *dev)
/* Lock out other clients */
ret = stm32_i2c_sem_wait_noncancelable(priv);
ret = nxsem_wait_uninterruptible(&priv->sem_excl);
if (ret < 0)
{
return ret;

View File

@ -319,8 +319,6 @@ static inline void stm32_i2c_putreg(FAR struct stm32_i2c_priv_s *priv,
static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
uint8_t offset, uint16_t clearbits,
uint16_t setbits);
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv);
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv);
#ifdef CONFIG_STM32_I2C_DYNTIMEO
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
@ -514,33 +512,6 @@ static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
modifyreg16(priv->config->base + offset, clearbits, setbits);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv)
{
return nxsem_wait(&priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait_noncancelable
*
* Description:
* Take the exclusive access, waiting as necessary
*
************************************************************************************/
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv)
{
return nxsem_wait_uninterruptible(&priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_tousecs
*
@ -2055,7 +2026,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev,
/* Ensure that address or flags don't change meanwhile */
ret = stm32_i2c_sem_wait(priv);
ret = nxsem_wait(&priv->sem_excl);
if (ret < 0)
{
return ret;
@ -2292,7 +2263,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
/* Lock out other clients */
ret = stm32_i2c_sem_wait_noncancelable(priv);
ret = nxsem_wait_uninterruptible(&priv->sem_excl);
if (ret < 0)
{
return ret;

View File

@ -447,8 +447,6 @@ static inline void stm32_i2c_putreg32(FAR struct stm32_i2c_priv_s *priv,
static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
uint8_t offset, uint32_t clearbits,
uint32_t setbits);
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev);
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev);
#ifdef CONFIG_STM32_I2C_DYNTIMEO
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
#endif /* CONFIG_STM32_I2C_DYNTIMEO */
@ -705,34 +703,6 @@ static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
modifyreg32(priv->config->base + offset, clearbits, setbits);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
{
return nxsem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait_noncancelable
*
* Description:
* Take the exclusive access, waiting as necessary
*
************************************************************************************/
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
{
return
nxsem_wait_uninterruptible(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_tousecs
*
@ -2522,7 +2492,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev,
/* Ensure that address or flags don't change meanwhile */
ret = stm32_i2c_sem_wait(dev);
ret = nxsem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
if (ret >= 0)
{
ret = stm32_i2c_process(dev, msgs, count);
@ -2562,7 +2532,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
/* Lock out other clients */
ret = stm32_i2c_sem_wait_noncancelable(dev);
ret = nxsem_wait_uninterruptible(&priv->sem_excl);
if (ret < 0)
{
return ret;

View File

@ -314,8 +314,6 @@ static inline void stm32_i2c_putreg(FAR struct stm32_i2c_priv_s *priv,
static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
uint8_t offset, uint16_t clearbits,
uint16_t setbits);
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv);
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv);
#ifdef CONFIG_STM32_I2C_DYNTIMEO
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
@ -560,34 +558,6 @@ static inline void stm32_i2c_modifyreg(FAR struct stm32_i2c_priv_s *priv,
modifyreg16(priv->config->base + offset, clearbits, setbits);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static inline int stm32_i2c_sem_wait(FAR struct stm32_i2c_priv_s *priv)
{
return nxsem_wait(&priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait_noncancelable
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static int stm32_i2c_sem_wait_noncancelable(FAR struct stm32_i2c_priv_s *priv)
{
return nxsem_wait_uninterruptible(&priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_tousecs
*
@ -2290,7 +2260,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev,
/* Ensure that address or flags don't change meanwhile */
ret = stm32_i2c_sem_wait(priv);
ret = nxsem_wait(&priv->sem_excl);
if (ret < 0)
{
return ret;
@ -2521,7 +2491,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s *dev)
/* Lock out other clients */
ret = stm32_i2c_sem_wait_noncancelable(priv);
ret = nxsem_wait_uninterruptible(&priv->sem_excl);
if (ret < 0)
{
return ret;

View File

@ -1345,7 +1345,6 @@ static void adc_reset(FAR struct adc_dev_s *dev)
{
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;
irqstate_t flags;
int ret;
ainfo("intf: %d\n", priv->intf);
flags = enter_critical_section();
@ -1359,8 +1358,7 @@ static void adc_reset(FAR struct adc_dev_s *dev)
/* Only if this is the first initialzied ADC instance in the ADC block */
#ifdef HAVE_ADC_CMN_DATA
ret = adccmn_lock(priv, true);
if (ret < 0)
if (adccmn_lock(priv, true) < 0)
{
return;
}
@ -1493,7 +1491,6 @@ static int adc_setup(FAR struct adc_dev_s *dev)
static void adc_shutdown(FAR struct adc_dev_s *dev)
{
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;
int ret;
/* Disable ADC */
@ -1507,8 +1504,7 @@ static void adc_shutdown(FAR struct adc_dev_s *dev)
#endif
#ifdef HAVE_ADC_CMN_DATA
ret = adccmn_lock(priv, true);
if (ret < 0)
if (adccmn_lock(priv, true) < 0)
{
return;
}

View File

@ -451,7 +451,6 @@ static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
uint8_t offset, uint32_t clearbits,
uint32_t setbits);
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev);
static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev);
#ifdef CONFIG_STM32F0L0G0_I2C_DYNTIMEO
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
#endif /* CONFIG_STM32F0L0G0_I2C_DYNTIMEO */
@ -718,20 +717,6 @@ static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
return nxsem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait_uninterruptble
*
* Description:
* Take the exclusive access, waiting as necessary
*
************************************************************************************/
static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev)
{
return
nxsem_wait_uninterruptible(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_tousecs
*
@ -2557,7 +2542,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
/* Lock out other clients */
ret = stm32_i2c_sem_wait_uninterruptble(dev);
ret = nxsem_wait_uninterruptible(&priv->sem_excl);
if (ret < 0)
{
return ret;

View File

@ -485,8 +485,6 @@ static inline void stm32_i2c_putreg32(FAR struct stm32_i2c_priv_s *priv,
static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
uint8_t offset, uint32_t clearbits,
uint32_t setbits);
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev);
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev);
#ifdef CONFIG_STM32F7_I2C_DYNTIMEO
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
#endif /* CONFIG_STM32F7_I2C_DYNTIMEO */
@ -743,35 +741,6 @@ static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
modifyreg32(priv->config->base + offset, clearbits, setbits);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
{
return nxsem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait_noncancelable
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
{
return
nxsem_wait_uninterruptible(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_tousecs
*
@ -2561,7 +2530,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev,
/* Ensure that address or flags don't change meanwhile */
ret = stm32_i2c_sem_wait(dev);
ret = nxsem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
if (ret >= 0)
{
ret = stm32_i2c_process(dev, msgs, count);
@ -2601,7 +2570,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
/* Lock out other clients */
ret = stm32_i2c_sem_wait_noncancelable(dev);
ret = nxsem_wait_uninterruptible(&priv->sem_excl);
if (ret < 0)
{
return ret;

View File

@ -438,8 +438,6 @@ static inline void stm32_i2c_putreg32(FAR struct stm32_i2c_priv_s *priv,
static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
uint8_t offset, uint32_t clearbits,
uint32_t setbits);
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev);
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev);
#ifdef CONFIG_STM32H7_I2C_DYNTIMEO
static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
#endif /* CONFIG_STM32H7_I2C_DYNTIMEO */
@ -696,35 +694,6 @@ static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv,
modifyreg32(priv->config->base + offset, clearbits, setbits);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static inline int stm32_i2c_sem_wait(FAR struct i2c_master_s *dev)
{
return nxsem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_sem_wait_noncancelable
*
* Description:
* Take the exclusive access, waiting as necessary. May be interrupted by a
* signal.
*
************************************************************************************/
static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
{
return
nxsem_wait_uninterruptible(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
}
/************************************************************************************
* Name: stm32_i2c_tousecs
*
@ -2506,7 +2475,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev,
/* Ensure that address or flags don't change meanwhile */
ret = stm32_i2c_sem_wait(dev);
ret = nxsem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl);
if (ret >= 0)
{
ret = stm32_i2c_process(dev, msgs, count);
@ -2546,7 +2515,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
/* Lock out other clients */
ret = stm32_i2c_sem_wait_noncancelable(dev);
ret = nxsem_wait_uninterruptible(&priv->sem_excl);
if (ret < 0)
{
return ret;

View File

@ -110,11 +110,6 @@ static inline bool pic32mx_outputhigh(uint16_t pinset)
return ((pinset & GPIO_VALUE_MASK) != 0);
}
static inline bool pic32mx_value(uint16_t pinset)
{
return ((pinset & GPIO_VALUE_MASK) != GPIO_VALUE_ZERO);
}
static inline unsigned int pic32mx_portno(uint16_t pinset)
{
return ((pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT);

View File

@ -143,7 +143,7 @@ static inline void pic32mx_putreg(uintptr_t uart_base, unsigned int offset,
*
****************************************************************************/
#ifdef HAVE_UART_DEVICE
#ifdef HAVE_SERIAL_CONSOLE
static inline uint32_t pic32mx_getreg(uintptr_t uart_base,
unsigned int offset)
{

View File

@ -501,8 +501,6 @@ static inline struct pic32mx_ep_s *
static inline void
pic32mx_epunreserve(struct pic32mx_usbdev_s *priv,
struct pic32mx_ep_s *privep);
static inline bool
pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno);
static void pic32mx_ep0configure(struct pic32mx_usbdev_s *priv);
/* Endpoint operations ******************************************************/
@ -3057,16 +3055,6 @@ pic32mx_epunreserve(struct pic32mx_usbdev_s *priv, struct pic32mx_ep_s *privep)
leave_critical_section(flags);
}
/****************************************************************************
* Name: pic32mx_epreserved
****************************************************************************/
static inline bool
pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno)
{
return ((priv->epavail & PIC32MX_ENDP_BIT(epno)) == 0);
}
/****************************************************************************
* Name: pic32mx_ep0configure
****************************************************************************/

View File

@ -121,11 +121,6 @@ static inline bool pic32mz_outputhigh(pinset_t pinset)
return ((pinset & GPIO_VALUE_MASK) != 0);
}
static inline bool pic32mz_value(pinset_t pinset)
{
return ((pinset & GPIO_VALUE_MASK) != GPIO_VALUE_ZERO);
}
static inline unsigned int pic32mz_portno(pinset_t pinset)
{
return ((pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT);

View File

@ -60,14 +60,6 @@
#define AUD_MCLK_EXT (0u<<16) /* External XTAL */
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div);
inline void cxd56_audio_clock_disable(void);
inline bool cxd56_audio_clock_is_enabled(void);
/****************************************************************************
* Private Data
****************************************************************************/

View File

@ -63,6 +63,7 @@ CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_NSH_CXXINITIALIZE=y
CONFIG_SYSTEM_TASKSET=y
CONFIG_TESTING_OSTEST=y
CONFIG_TESTING_OSTEST_FPUTESTDISABLE=y
CONFIG_TESTING_SMP=y
CONFIG_UART1_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -117,7 +117,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
#ifdef CONFIG_SPI_CMDDATA
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
#endif
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t ch);
static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t ch);
static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer,
size_t nwords);
static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
@ -359,7 +359,7 @@ static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
*
****************************************************************************/
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd)
static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd)
{
register uint16_t regval;

View File

@ -413,7 +413,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid,
bool cmd);
#endif
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd);
static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd);
static void spi_sndblock(FAR struct spi_dev_s *dev,
FAR const void *buffer, size_t buflen);
static void spi_recvblock(FAR struct spi_dev_s *dev,
@ -784,7 +784,7 @@ static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
*
****************************************************************************/
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd)
static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd)
{
FAR struct str71x_spidev_s *priv = (FAR struct str71x_spidev_s *)dev;

View File

@ -1935,7 +1935,7 @@ static void mmcsd_mediachanged(void *arg)
ret = mmcsd_semtake(slot);
if (ret < 0)
{
return ret;
return;
}
oldstate = slot->state;

View File

@ -724,7 +724,7 @@ static ssize_t gs2200m_read(FAR struct file *filep, FAR char *buffer,
ASSERT(1 == len);
ret = nxsem_wait(dev);
ret = nxsem_wait(&dev->dev_sem);
if (ret < 0)
{
/* Return if a signal is received or if the the task was canceled

View File

@ -67,13 +67,13 @@ int bcmf_sem_wait(sem_t *sem, unsigned int timeout_ms);
dq_entry_t *bcmf_dqueue_pop_tail(dq_queue_t *queue);
void bcmf_dqueue_push(dq_queue_t *queue, dq_entry_t *entry);
static inline uint16_t bcmf_getle16(uint16_t *val)
static inline uint16_t bcmf_getle16(void *val)
{
uint8_t *valb = (uint8_t *)val;
return (uint16_t)valb[0] << 8 | (uint16_t)valb[1];
}
static inline uint16_t bcmf_getle32(uint32_t *val)
static inline uint32_t bcmf_getle32(void *val)
{
uint16_t *valw = (uint16_t *)val;
return (uint32_t)bcmf_getle16(valw) << 16 | bcmf_getle16(valw + 1);

View File

@ -40,6 +40,7 @@
#include <nuttx/wireless/ieee80211/mmc_sdio.h>
#include <debug.h>
#include <errno.h>
#include <string.h>
#include <nuttx/compiler.h>
#include <nuttx/arch.h>
@ -131,6 +132,7 @@ int sdio_io_rw_direct(FAR struct sdio_dev_s *dev, bool write,
{
union sdio_cmd5x arg;
struct sdio_resp_R5 resp;
uint32_t data;
int ret;
/* Setup CMD52 argument */
@ -154,7 +156,7 @@ int sdio_io_rw_direct(FAR struct sdio_dev_s *dev, bool write,
/* Send CMD52 command */
sdio_sendcmdpoll(dev, SD_ACMD52, arg.value);
ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp);
ret = SDIO_RECVR5(dev, SD_ACMD52, &data);
if (ret != OK)
{
@ -162,6 +164,8 @@ int sdio_io_rw_direct(FAR struct sdio_dev_s *dev, bool write,
return ret;
}
memcpy(&resp, &data, sizeof(resp));
/* Check for errors */
if (resp.flags.error)
@ -191,6 +195,7 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write,
{
union sdio_cmd5x arg;
struct sdio_resp_R5 resp;
uint32_t data;
int ret;
sdio_eventset_t wkupevent;
@ -233,15 +238,15 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write,
if ((SDIO_CAPABILITIES(dev) & SDIO_CAPS_DMABEFOREWRITE) != 0)
{
SDIO_DMASENDSETUP(dev, buf, blocklen * nblocks);
SDIO_SENDCMD(dev, SD_ACMD53, (uint32_t)arg.value);
SDIO_SENDCMD(dev, SD_ACMD53, arg.value);
wkupevent = SDIO_EVENTWAIT(dev, SDIO_CMD53_TIMEOUT_MS);
ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
ret = SDIO_RECVR5(dev, SD_ACMD53, &data);
}
else
{
sdio_sendcmdpoll(dev, SD_ACMD53, (uint32_t)arg.value);
ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
sdio_sendcmdpoll(dev, SD_ACMD53, arg.value);
ret = SDIO_RECVR5(dev, SD_ACMD53, &data);
SDIO_DMASENDSETUP(dev, buf, blocklen * nblocks);
wkupevent = SDIO_EVENTWAIT(dev, SDIO_CMD53_TIMEOUT_MS);
@ -251,10 +256,10 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write,
{
wlinfo("prep read %d\n", blocklen * nblocks);
SDIO_DMARECVSETUP(dev, buf, blocklen * nblocks);
SDIO_SENDCMD(dev, SD_ACMD53, (uint32_t)arg.value);
SDIO_SENDCMD(dev, SD_ACMD53, arg.value);
wkupevent = SDIO_EVENTWAIT(dev, SDIO_CMD53_TIMEOUT_MS);
ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
ret = SDIO_RECVR5(dev, SD_ACMD53, &data);
}
wlinfo("Transaction ends\n");
@ -262,7 +267,7 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write,
/* There may not be a response to this, so don't look for one */
SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp);
SDIO_RECVR1(dev, SD_ACMD52ABRT, &data);
if (ret != OK)
{
@ -270,6 +275,8 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write,
return ret;
}
memcpy(&resp, &data, sizeof(resp));
/* Check for errors */
if (wkupevent & SDIOWAIT_TIMEOUT)

View File

@ -144,7 +144,7 @@
/* Some assertions */
#ifdef CONFIG_LPWAN_SX127X_FSKOOK
# warning OOK support is not complete, RX+TX doesn't work yet!
# warning OOK support is not complete, RX+TX does not work yet!
# if CONFIG_LPWAN_SX127X_RXFIFO_DATA_LEN > SX127X_FOM_FIFO_LEN
# warning RX data length limited by chip RX FIFO size (FSK/OOK = 64, LORA = 256)
# endif

View File

@ -74,6 +74,24 @@ struct ptable_s
struct ptable_entry_s entries[];
};
/****************************************************************************
* Private Functions
****************************************************************************/
static int read_partition_block(FAR struct partition_state_s *state,
FAR void *buffer, size_t startblock,
size_t nblocks)
{
if (state->blk)
{
return state->blk->u.i_bops->read(state->blk, buffer, startblock, nblocks);
}
else
{
return state->mtd->bread(state->mtd, startblock, nblocks, buffer);
}
}
/****************************************************************************
* Public Functions
****************************************************************************/

View File

@ -59,24 +59,6 @@ struct partition_state_s
size_t erasesize;
};
/****************************************************************************
* Public Inline Functions
****************************************************************************/
static inline int read_partition_block(FAR struct partition_state_s *state,
FAR void *buffer, size_t startblock,
size_t nblocks)
{
if (state->blk)
{
return state->blk->u.i_bops->read(state->blk, buffer, startblock, nblocks);
}
else
{
return state->mtd->bread(state->mtd, startblock, nblocks, buffer);
}
}
#endif /* CONFIG_DISABLE_MOUNTPOINT */
#endif /* __FS_PARTITION_PARTITION_H */

View File

@ -261,7 +261,6 @@ int local_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
else
{
fds->priv = shadowfds;
ret = OK;
}
}
break;
@ -298,7 +297,6 @@ int local_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
ret = OK;
break;
}
#endif
return ret;
@ -306,6 +304,7 @@ pollerr:
fds->revents |= POLLERR;
nxsem_post(fds->sem);
return OK;
#endif
}
/****************************************************************************
@ -327,14 +326,13 @@ pollerr:
int local_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds)
{
FAR struct local_conn_s *conn;
int status = OK;
int ret = -ENOSYS;
int ret = OK;
conn = (FAR struct local_conn_s *)psock->s_conn;
if (conn->lc_proto == SOCK_DGRAM)
{
return ret;
return -ENOSYS;
}
#ifdef CONFIG_NET_LOCAL_STREAM
@ -354,6 +352,7 @@ int local_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds)
case (POLLIN | POLLOUT):
{
FAR struct pollfd *shadowfds = fds->priv;
int ret2;
if (shadowfds == NULL)
{
@ -363,15 +362,10 @@ int local_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds)
/* Teardown for both shadow pollfds. */
ret = file_poll(&conn->lc_infile, &shadowfds[0], false);
if (ret < 0)
ret2 = file_poll(&conn->lc_outfile, &shadowfds[1], false);
if (ret2 < 0)
{
status = ret;
}
ret = file_poll(&conn->lc_outfile, &shadowfds[1], false);
if (ret < 0)
{
status = ret;
ret = ret2;
}
fds->revents |= shadowfds[0].revents | shadowfds[1].revents;
@ -387,7 +381,7 @@ int local_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds)
return OK;
}
status = file_poll(&conn->lc_infile, fds, false);
ret = file_poll(&conn->lc_infile, fds, false);
}
break;
@ -398,7 +392,7 @@ int local_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds)
return OK;
}
status = file_poll(&conn->lc_outfile, fds, false);
ret = file_poll(&conn->lc_outfile, fds, false);
}
break;
@ -407,7 +401,7 @@ int local_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds)
}
#endif
return status;
return ret;
}
#endif /* HAVE_LOCAL_POLL */

View File

@ -781,7 +781,7 @@ static inline void mac802154_setrxonidle(FAR struct ieee802154_privmac_s *priv,
}
static inline void mac802154_setdevmode(FAR struct ieee802154_privmac_s *priv,
enum ieee802154_devmode_e mode)
uint8_t mode)
{
priv->devmode = mode;
priv->radio->setattr(priv->radio, IEEE802154_ATTR_MAC_DEVMODE,