pkarashchenko commented on code in PR #8707:
URL: https://github.com/apache/nuttx/pull/8707#discussion_r1125607449


##########
arch/arm/src/imx6/imx_gpio.c:
##########
@@ -542,16 +544,25 @@ int imx_config_gpio(gpio_pinset_t pinset)
         }
         break;
 
-      case GPIO_PERIPH:
-        {
-          /* Configure the pin as a peripheral */
-
-          ret = imx_gpio_configperiph(pinset);
-        }
-        break;
-
       default:
-        ret = -EINVAL;
+
+        /* Workaround for:
+         * chip/imx_gpio.c:545:7: error: case label does not reduce to an
+         *   integer constant
+         *    545 |       case GPIO_PERIPH:
+         *        |       ^~~~
+         */
+
+        if (pinset == GPIO_PERIPH)

Review Comment:
   I believe that it is not a single place in the code that will have such an 
issue. Also a question will `(2u << 30)` also generate an issue, or is it only 
a limitation of int?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to