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

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

commit 0ba22f8e09018a375a1fff1a4b00fb8ddcc927e1
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Oct 19 00:08:30 2026 +0200

    drivers/usbmisc/fusb302: Fix two unbalanced parentheses.
    
    The I2C_RESET() call in fusb302_irqworker() has no closing parenthesis,
    so the file does not compile with CONFIG_I2C_RESET.  SET_WAIT_MODE()
    has one opening parenthesis too many, and its only user has one closing
    parenthesis too many to match it.  Fix both.  The code that the default
    configuration compiles does not change.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 drivers/usbmisc/fusb302.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usbmisc/fusb302.c b/drivers/usbmisc/fusb302.c
index 16bd73f1c9b..d44ccc894e2 100644
--- a/drivers/usbmisc/fusb302.c
+++ b/drivers/usbmisc/fusb302.c
@@ -151,7 +151,7 @@
 #define WAIT_40MS                     (0b01)
 #define WAIT_80MS                     (0b10)
 #define WAIT_160MS                    (0b11)
-#define SET_WAIT_MODE(n)              (((uint8_t)(n) << 
CONTROL2_TOG_SAVE_PWR_SHIFT)
+#define SET_WAIT_MODE(n)              ((uint8_t)(n) << 
CONTROL2_TOG_SAVE_PWR_SHIFT)
 
 /* Control3 - 0x09 */
 
@@ -1333,7 +1333,7 @@ static int fusb302_putreg(FAR struct fusb302_dev_s *priv, 
uint8_t regaddr,
               break;
             }
 
-          ret = I2C_RESET(priv->config->i2c;
+          ret = I2C_RESET(priv->config->i2c);
           if (ret < 0)
             {
               fusb302_err("ERROR: I2C_RESET failed: %d\n", ret);
@@ -1463,7 +1463,7 @@ static int fusb302_set_mode(FAR struct fusb302_dev_s 
*priv,
           ret = fusb302_putreg(priv, FUSB302_CONTROL2_REG,
                                (SET_POLL_MODE(DRP_POLLING) |
                                 CONTROL2_TOGGLE |
-                                SET_WAIT_MODE(WAIT_80MS))));
+                                SET_WAIT_MODE(WAIT_80MS)));
           priv->state = WAITING_FOR_DRP_TOGG_I;
           priv->connect_status = TOGGLING;
           set_int_mask(priv);

Reply via email to