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/nuttx.git

commit 38fbe166ee7f20efeeac2b8f8afa97107635daa2
Author: Jouni Ukkonen <jouni.ukko...@unikie.com>
AuthorDate: Tue Aug 27 15:18:29 2024 +0300

    drivers/ioexpander/tca64xx: Fix compile errors
    
    - Fix gpioinfo argument type
    - Fix unused variable "ret" warning when CONFIG_TCA64XX_INT_POLL is not 
defined
    
    Signed-off-by: Jouni Ukkonen <jouni.ukko...@unikie.com>
    Signed-off-by: Jukka Laitinen <jukka.laiti...@tii.ae>
---
 drivers/ioexpander/tca64xx.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/ioexpander/tca64xx.c b/drivers/ioexpander/tca64xx.c
index eccdfd5a26..cbb3faac17 100644
--- a/drivers/ioexpander/tca64xx.c
+++ b/drivers/ioexpander/tca64xx.c
@@ -346,7 +346,7 @@ static int tca64_putreg(struct tca64_dev_s *priv, uint8_t 
regaddr,
   else
     {
       gpioinfo("claddr=%02x, regaddr=%02x, regval=%02x\n",
-               priv->config->address, regaddr, regval);
+               priv->config->address, regaddr, *regval);
       return OK;
     }
 }
@@ -1346,7 +1346,6 @@ tca64_initialize(FAR struct i2c_master_s *i2c,
                  FAR struct tca64_config_s *config)
 {
   FAR struct tca64_dev_s *priv;
-  int ret;
 
 #ifdef CONFIG_TCA64XX_MULTIPLE
   /* Allocate the device state structure */
@@ -1379,9 +1378,8 @@ tca64_initialize(FAR struct i2c_master_s *i2c,
 #ifdef CONFIG_TCA64XX_INT_POLL
   /* Set up a timer to poll for missed interrupts */
 
-  ret = wd_start(&priv->wdog, TCA64XX_POLLDELAY,
-                 tca64_poll_expiry, (wdparm_t)priv);
-  if (ret < 0)
+  if (wd_start(&priv->wdog, TCA64XX_POLLDELAY,
+               tca64_poll_expiry, (wdparm_t)priv) < 0)
     {
       gpioerr("ERROR: Failed to start poll timer\n");
     }

Reply via email to