You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/11/10 20:43:58 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4774: GPIO driver: Use generic /dev/gpioN

gustavonihei commented on a change in pull request #4774:
URL: https://github.com/apache/incubator-nuttx/pull/4774#discussion_r746971209



##########
File path: drivers/ioexpander/gpio.c
##########
@@ -511,20 +511,14 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
  * Name: gpio_pin_register
  *
  * Description:
- *   Register GPIO pin device driver.
- *
- *   - Input pin types will be registered at /dev/gpinN
- *   - Output pin types will be registered at /dev/gpoutN
- *   - Interrupt pin types will be registered at /dev/gpintN
- *
- *   Where N is the provided minor number in the range of 0-99.
+ *   Register GPIO pin device driver at /dev/gpioN, where N is the provided
+ *   minor number in the range of 0-99.
  *
  ****************************************************************************/
 
 int gpio_pin_register(FAR struct gpio_dev_s *dev, int minor)
 {
-  FAR const char *fmt;
-  char devname[32];
+  char devname[16];

Review comment:
       ```suggestion
     char devname[32];
   ```
   If we consider the max value for `int minor`, it requires more than 16 characters. This change should be reverted.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org