pkarashchenko commented on code in PR #7191: URL: https://github.com/apache/incubator-nuttx/pull/7191#discussion_r980730071
########## arch/arm/src/stm32f7/stm32_bbsram.c: ########## @@ -424,7 +424,7 @@ static off_t stm32_bbsram_seek(struct file *filep, off_t offset, * point, subsequent reads of data in the gap shall return bytes with the * value 0 until data is actually written into the gap." * - * We can conform to the first part, but not the second. But return EINVAL + * We can conform to the first part, but not the second. But return -EINVAL Review Comment: ```suggestion * We can conform to the first part, but not the second. But return -EINVAL ``` I think most of the comments have 2 spaces after dot ########## drivers/bch/bchdev_driver.c: ########## @@ -261,7 +261,7 @@ static off_t bch_seek(FAR struct file *filep, off_t offset, int whence) * point, subsequent reads of data in the gap shall return bytes with the * value 0 until data is actually written into the gap." * - * We can conform to the first part, but not the second. But return EINVAL + * We can conform to the first part, but not the second. But return -EINVAL Review Comment: ```suggestion * We can conform to the first part, but not the second. But return -EINVAL ``` ########## arch/arm/src/stm32h7/stm32_bbsram.c: ########## @@ -470,7 +470,7 @@ static off_t stm32_bbsram_seek(struct file *filep, off_t offset, * point, subsequent reads of data in the gap shall return bytes with the * value 0 until data is actually written into the gap." * - * We can conform to the first part, but not the second. But return EINVAL + * We can conform to the first part, but not the second. But return -EINVAL Review Comment: ```suggestion * We can conform to the first part, but not the second. But return -EINVAL ``` ########## arch/arm/src/cxd56xx/cxd56_gnss.c: ########## @@ -2787,8 +2784,8 @@ static ssize_t cxd56_gnss_read(struct file *filep, char *buffer, ret = fw_gd_readbuffer(type, offset, buffer, len); - _err: - _success: +err: +success: Review Comment: Maybe we can use a single `out` label here? ########## drivers/eeprom/i2c_xx24xx.c: ########## @@ -497,7 +497,7 @@ static off_t ee24xx_seek(FAR struct file *filep, off_t offset, int whence) * this point, subsequent reads of data in the gap shall return bytes * with the value 0 until data is actually written into the gap." * - * We can conform to the first part, but not the second. But return EINVAL + * We can conform to the first part, but not the second. But return -EINVAL Review Comment: ```suggestion * We can conform to the first part, but not the second. But return -EINVAL ``` ########## arch/renesas/src/rx65n/rx65n_usbhost.c: ########## @@ -7649,6 +7649,7 @@ static ssize_t rx65n_usbhost_transfer(struct usbhost_driver_s *drvr, ed->xfrinfo = NULL; } while (0); + errout_with_sem: /* rx65n_usbhost_givesem(&priv->exclsem); */ Review Comment: ```suggestion errout_with_sem: /* rx65n_usbhost_givesem(&priv->exclsem); */ ``` ########## arch/sim/src/sim/vpnkit/protocol.c: ########## @@ -141,6 +141,7 @@ int really_write(int fd, uint8_t *buffer, size_t total) } return 0; + err: /* On error: stop listening to the socket */ Review Comment: ```suggestion err: /* On error: stop listening to the socket */ ``` ########## arch/arm/src/cxd56xx/cxd56_gnss.c: ########## @@ -3063,21 +3060,20 @@ static int cxd56_gnss_register(const char *devpath) { gnsserr("Failed to initialize ICC for GPS CPU: %d,%d\n", ret, devsig_table[i].sigtype); - goto _err2; + goto err2; } cxd56_cpu1sigregisterhandler(devsig_table[i].sigtype, devsig_table[i].handler); } gnssinfo("GNSS driver loaded successfully!\n"); - return ret; - _err2: +err2: Review Comment: ```suggestion err1: ``` ########## arch/xtensa/src/esp32/esp32_spiflash.c: ########## @@ -1570,9 +1570,7 @@ static ssize_t esp32_read(struct mtd_dev_s *dev, off_t offset, finfo("esp32_read()=%d\n", ret); #endif -error_with_buffer: - - return (ssize_t)ret; + return ret; Review Comment: Notice: Maybe ret should be changed to ssize_t? -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org