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 2022/10/29 14:06:01 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #7473: Fix the coding style issue

xiaoxiang781216 opened a new pull request, #7473:
URL: https://github.com/apache/incubator-nuttx/pull/7473

   ## Summary
   
   ## Impact
   code refactor
   
   ## Testing
   Pass CI
   


-- 
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


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7473: Call nxsem_destroy or nxmutex_destry in the error path

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7473:
URL: https://github.com/apache/incubator-nuttx/pull/7473#discussion_r1008747959


##########
drivers/wireless/nrf24l01.c:
##########
@@ -1496,7 +1497,7 @@ int nrf24l01_register(FAR struct spi_dev_s *spi,
   dev->rx_fifo = rx_fifo;
 
   nxmutex_init(&dev->lock_fifo);
-  nxsem_init(&dev->sem_rx, 0, 0);
+  nxsem_init(&(dev->sem_rx), 0, 0);

Review Comment:
   why is this needed?



##########
drivers/wireless/gs2200m.c:
##########
@@ -889,10 +889,10 @@ static uint16_t _read_data_len(FAR struct gs2200m_dev_s *dev)
  ****************************************************************************/
 
 enum spi_status_e gs2200m_hal_write(FAR struct gs2200m_dev_s *dev,
-                                    const void *data,
+                                    FAR const void *data,
                                     uint16_t txlen)
 {
-  uint8_t *tx = (uint8_t *)data;
+  FAR uint8_t *tx = (FAR uint8_t *)data;
   uint8_t  hdr[8];
   uint8_t  res[8];

Review Comment:
   ```suggestion
     uint8_t hdr[8];
     uint8_t res[8];
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -1298,11 +1298,11 @@ static int smartfs_readdir(FAR struct inode *mountpt,
 {
   FAR struct smartfs_mountpt_s *fs;
   FAR struct smartfs_dir_s *sdir;
-  int                   ret;
-  uint16_t              entrysize;
-  struct                smartfs_chain_header_s *header;
-  struct                smart_read_write_s readwrite;
-  struct                smartfs_entry_header_s *entry;
+  FAR struct smartfs_chain_header_s *header;
+  struct smart_read_write_s readwrite;
+  FAR struct smartfs_entry_header_s *entry;
+  uint16_t entrysize;
+  int      ret;

Review Comment:
   ```suggestion
     int ret;
   ```



-- 
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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7473: Call nxsem_destroy or nxmutex_destry in the error path

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7473:
URL: https://github.com/apache/incubator-nuttx/pull/7473#discussion_r1008789046


##########
drivers/wireless/gs2200m.c:
##########
@@ -889,10 +889,10 @@ static uint16_t _read_data_len(FAR struct gs2200m_dev_s *dev)
  ****************************************************************************/
 
 enum spi_status_e gs2200m_hal_write(FAR struct gs2200m_dev_s *dev,
-                                    const void *data,
+                                    FAR const void *data,
                                     uint16_t txlen)
 {
-  uint8_t *tx = (uint8_t *)data;
+  FAR uint8_t *tx = (FAR uint8_t *)data;
   uint8_t  hdr[8];
   uint8_t  res[8];

Review Comment:
   Done.



-- 
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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7473: Call nxsem_destroy or nxmutex_destry in the error path

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7473:
URL: https://github.com/apache/incubator-nuttx/pull/7473#discussion_r1008788963


##########
fs/smartfs/smartfs_smart.c:
##########
@@ -1298,11 +1298,11 @@ static int smartfs_readdir(FAR struct inode *mountpt,
 {
   FAR struct smartfs_mountpt_s *fs;
   FAR struct smartfs_dir_s *sdir;
-  int                   ret;
-  uint16_t              entrysize;
-  struct                smartfs_chain_header_s *header;
-  struct                smart_read_write_s readwrite;
-  struct                smartfs_entry_header_s *entry;
+  FAR struct smartfs_chain_header_s *header;
+  struct smart_read_write_s readwrite;
+  FAR struct smartfs_entry_header_s *entry;
+  uint16_t entrysize;
+  int      ret;

Review Comment:
   Done.



##########
drivers/wireless/nrf24l01.c:
##########
@@ -1496,7 +1497,7 @@ int nrf24l01_register(FAR struct spi_dev_s *spi,
   dev->rx_fifo = rx_fifo;
 
   nxmutex_init(&dev->lock_fifo);
-  nxsem_init(&dev->sem_rx, 0, 0);
+  nxsem_init(&(dev->sem_rx), 0, 0);

Review Comment:
   Done.



-- 
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


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #7473: Call nxsem_destroy or nxmutex_destry in the error path

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #7473:
URL: https://github.com/apache/incubator-nuttx/pull/7473


-- 
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