pkarashchenko commented on code in PR #6965:
URL: https://github.com/apache/incubator-nuttx/pull/6965#discussion_r989462472


##########
fs/procfs/fs_procfs.c:
##########
@@ -947,7 +947,7 @@ static int procfs_rewinddir(struct inode *mountpt, struct 
fs_dirent_s *dir)
 
   if (priv->level > 0 && priv->procfsentry == NULL)
     {
-      priv->index = ((struct procfs_level1_s *) priv)->firstindex;
+      priv->index = ((struct procfs_level1_s *)priv)->firstindex;

Review Comment:
   ```suggestion
         priv->index = ((FAR struct procfs_level1_s *)priv)->firstindex;
   ```



##########
fs/smartfs/smartfs_procfs.c:
##########
@@ -90,7 +90,7 @@ struct smartfs_file_s
 
 struct smartfs_procfs_entry_s
 {
-  const char  *name;                 /* Name of the directory entry */
+  const char *name;                  /* Name of the directory entry */

Review Comment:
   ```suggestion
     FAR const char *name;              /* Name of the directory entry */
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -763,14 +763,14 @@ static ssize_t smartfs_write(FAR struct file *filep, 
const char *buffer,
            */
 
           readwrite.offset = 0;
-          readwrite.buffer = (uint8_t *) fs->fs_rwbuffer;
+          readwrite.buffer = (uint8_t *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
             readwrite.buffer = (FAR uint8_t *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -802,7 +802,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const 
char *buffer,
 #else  /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
       readwrite.offset = sf->curroffset;
       readwrite.logsector = sf->currsector;
-      readwrite.buffer = (uint8_t *) &buffer[byteswritten];
+      readwrite.buffer = (uint8_t *)&buffer[byteswritten];

Review Comment:
   ```suggestion
         readwrite.buffer = (FAR uint8_t *)&buffer[byteswritten];
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -260,8 +242,8 @@ int smartfs_mount(struct smartfs_mountpt_s *fs, bool 
writeable)
 
   if (nextfs == NULL)
     {
-      fs->fs_rwbuffer = (char *) kmm_malloc(fs->fs_llformat.availbytes);
-      fs->fs_workbuffer = (char *) kmm_malloc(WORKBUFFER_SIZE);
+      fs->fs_rwbuffer = (char *)kmm_malloc(fs->fs_llformat.availbytes);
+      fs->fs_workbuffer = (char *)kmm_malloc(WORKBUFFER_SIZE);

Review Comment:
   ```suggestion
         fs->fs_rwbuffer = (FAR char *)kmm_malloc(fs->fs_llformat.availbytes);
         fs->fs_workbuffer = (FAR char *)kmm_malloc(WORKBUFFER_SIZE);
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -562,19 +562,19 @@ static ssize_t smartfs_read(FAR struct file *filep, char 
*buffer,
 
       readwrite.logsector = sf->currsector;
       readwrite.offset = 0;
-      readwrite.buffer = (uint8_t *) fs->fs_rwbuffer;
+      readwrite.buffer = (uint8_t *)fs->fs_rwbuffer;
       readwrite.count = fs->fs_llformat.availbytes;
       ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite);

Review Comment:
   ```suggestion
         ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long)&readwrite);
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -1649,7 +1631,7 @@ off_t smartfs_seek_internal(FAR struct smartfs_mountpt_s 
*fs,
       readwrite.logsector = sf->currsector;
       readwrite.offset    = 0;
       readwrite.count     = sizeof(struct smartfs_chain_header_s);
-      readwrite.buffer    = (uint8_t *) fs->fs_rwbuffer;
+      readwrite.buffer    = (uint8_t *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
         readwrite.buffer    = (FAR uint8_t *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs.h:
##########
@@ -33,7 +33,7 @@
 
 #include <nuttx/mtd/mtd.h>
 #include <nuttx/fs/smart.h>
-#include <nuttx/semaphore.h>
+#include <nuttx/mutex.h>

Review Comment:
   Why do we need this include here?



##########
fs/rpmsgfs/rpmsgfs.c:
##########
@@ -308,21 +291,21 @@ static int rpmsgfs_open(FAR struct file *filep, FAR const 
char *relpath,
 
   DEBUGASSERT(fs != NULL);
 
-  /* Take the semaphore */
+  /* Take the lock */
 
-  ret = rpmsgfs_semtake(fs);
+  ret = nxmutex_lock(&fs->fs_lock);
   if (ret < 0)
     {
       return ret;
     }
 
   /* Allocate memory for the open file */
 
-  hf = (struct rpmsgfs_ofile_s *) kmm_malloc(sizeof *hf);
+  hf = (struct rpmsgfs_ofile_s *)kmm_malloc(sizeof *hf);

Review Comment:
   ```suggestion
     hf = (FAR struct rpmsgfs_ofile_s *)kmm_malloc(sizeof *hf);
   ```



##########
fs/procfs/fs_procfs.c:
##########
@@ -383,7 +383,7 @@ static int procfs_open(FAR struct file *filep, FAR const 
char *relpath,
             {
               DEBUGASSERT(filep->f_priv);
 
-              ((struct procfs_file_s *) filep->f_priv)->procfsentry =
+              ((struct procfs_file_s *)filep->f_priv)->procfsentry =

Review Comment:
   ```suggestion
                 ((FAR struct procfs_file_s *)filep->f_priv)->procfsentry =
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -340,7 +340,7 @@ static int smartfs_open(FAR struct file *filep, const char 
*relpath,
       readwrite.logsector = sf->currsector;
       readwrite.offset    = 0;
       readwrite.count     = fs->fs_llformat.availbytes;
-      readwrite.buffer    = (uint8_t *) sf->buffer;
+      readwrite.buffer    = (uint8_t *)sf->buffer;

Review Comment:
   ```suggestion
         readwrite.buffer    = (FAR uint8_t *)sf->buffer;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -562,19 +562,19 @@ static ssize_t smartfs_read(FAR struct file *filep, char 
*buffer,
 
       readwrite.logsector = sf->currsector;
       readwrite.offset = 0;
-      readwrite.buffer = (uint8_t *) fs->fs_rwbuffer;
+      readwrite.buffer = (uint8_t *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
         readwrite.buffer = (FAR uint8_t *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -693,15 +693,15 @@ static ssize_t smartfs_write(FAR struct file *filep, 
const char *buffer,
       if (ret < 0)
         {
           ret = -EIO;
-          goto errout_with_semaphore;
+          goto errout_with_lock;
         }
     }
 
   /* First test if we are overwriting an existing location or writing to
    * a new one.
    */
 
-  header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+  header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
     header = (FAR struct smartfs_chain_header_s *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -714,7 +714,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const 
char *buffer,
 
       readwrite.offset = sf->curroffset;
       readwrite.logsector = sf->currsector;
-      readwrite.buffer = (uint8_t *) &buffer[byteswritten];
+      readwrite.buffer = (uint8_t *)&buffer[byteswritten];

Review Comment:
   ```suggestion
         readwrite.buffer = (FAR uint8_t *)&buffer[byteswritten];
   ```



##########
fs/vfs/fs_timerfd.c:
##########
@@ -282,10 +284,10 @@ static int timerfd_blocking_io(FAR struct timerfd_priv_s 
*dev,
   if (ret < 0)
     {
       /* Interrupted wait, unregister semaphore
-       * TODO ensure that exclsem wait does not fail (ECANCELED)
+       * TODO ensure that lock wait does not fail (ECANCELED)
        */
 
-      nxsem_wait_uninterruptible(&dev->exclsem);
+      nxmutex_lock(&dev->lock);
 
       timerfd_waiter_sem_t *cur_sem = *slist;

Review Comment:
   ```suggestion
         FAR timerfd_waiter_sem_t *cur_sem = *slist;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -902,22 +902,22 @@ static ssize_t smartfs_write(FAR struct file *filep, 
const char *buffer,
               if (ret < 0)
                 {
                   ferr("ERROR: Error %d allocating new sector\n", ret);
-                  goto errout_with_semaphore;
+                  goto errout_with_lock;
                 }
 
               /* Copy the new sector to the old one and chain it */
 
-              header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+              header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
                 header = (FAR struct smartfs_chain_header_s *)fs->fs_rwbuffer;
   ```



##########
include/nuttx/drivers/rwbuffer.h:
##########
@@ -127,7 +127,7 @@ struct rwbuffer_s
   /* This is the state of the write buffering */
 
 #ifdef CONFIG_DRVR_WRITEBUFFER
-  sem_t         wrsem;           /* Enforces exclusive access to the write 
buffer */
+  mutex_t       wrlock;          /* Enforces exclusive access to the write 
buffer */
   struct work_s work;            /* Delayed work to flush buffer after a delay 
with no activity */
   uint8_t      *wrbuffer;        /* Allocated write buffer */

Review Comment:
   ```suggestion
     FAR uint8_t      *wrbuffer;        /* Allocated write buffer */
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -1337,7 +1337,7 @@ static int smartfs_readdir(FAR struct inode *mountpt,
       ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite);

Review Comment:
   ```suggestion
         ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long)&readwrite);
   ```



##########
include/nuttx/wireless/ieee80211/bcmf_gspi.h:
##########
@@ -60,32 +61,32 @@ typedef struct gspi_dev_s
    * following fields before calling gspi_register.
    */
 
-  FAR int  (*init)            (FAR struct gspi_dev_s   *gspi);
+  FAR int  (*init)            (FAR struct gspi_dev_s  *gspi);

Review Comment:
   ```suggestion
     CODE int  (*init)            (FAR struct gspi_dev_s  *gspi);
   ```



##########
include/nuttx/analog/dac.h:
##########
@@ -127,14 +128,14 @@ struct dac_ops_s
 
 struct dac_dev_s
 {
-  const struct dac_ops_s *ad_ops;      /* Arch-specific operations */
-  void                   *ad_priv;     /* Used by the arch-specific logic */
-  uint8_t                 ad_ocount;   /* The number of times the device has
-                                        * been opened */
-  uint8_t                 ad_nchannel; /* Number of dac channel */
-  sem_t                   ad_closesem; /* Locks out new opens while close is
-                                        * in progress */
-  struct dac_fifo_s       ad_xmit;     /* Describes receive FIFO */
+  const struct dac_ops_s *ad_ops;       /* Arch-specific operations */
+  void                   *ad_priv;      /* Used by the arch-specific logic */

Review Comment:
   ```suggestion
     FAR const struct dac_ops_s *ad_ops;       /* Arch-specific operations */
     FAR void                   *ad_priv;      /* Used by the arch-specific 
logic */
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -763,14 +763,14 @@ static ssize_t smartfs_write(FAR struct file *filep, 
const char *buffer,
            */
 
           readwrite.offset = 0;
-          readwrite.buffer = (uint8_t *) fs->fs_rwbuffer;
+          readwrite.buffer = (uint8_t *)fs->fs_rwbuffer;
           readwrite.count = sizeof(struct smartfs_chain_header_s);
           ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite);

Review Comment:
   ```suggestion
             ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long)&readwrite);
   ```



##########
libs/libc/audio/lib_buffer.c:
##########
@@ -85,9 +55,9 @@ static void apb_semtake(FAR struct ap_buffer_s *apb)
 
 int apb_alloc(FAR struct audio_buf_desc_s *bufdesc)
 {
-  uint32_t            bufsize;
-  int                 ret;
-  struct ap_buffer_s  *apb;
+  uint32_t           bufsize;
+  int                ret;
+  struct ap_buffer_s *apb;

Review Comment:
   ```suggestion
     FAR struct ap_buffer_s *apb;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -902,22 +902,22 @@ static ssize_t smartfs_write(FAR struct file *filep, 
const char *buffer,
               if (ret < 0)
                 {
                   ferr("ERROR: Error %d allocating new sector\n", ret);
-                  goto errout_with_semaphore;
+                  goto errout_with_lock;
                 }
 
               /* Copy the new sector to the old one and chain it */
 
-              header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+              header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;
               SMARTFS_SET_NEXTSECTOR(header, ret);
               readwrite.offset = offsetof(struct smartfs_chain_header_s,
                 nextsector);
-              readwrite.buffer = (uint8_t *) header->nextsector;
+              readwrite.buffer = (uint8_t *)header->nextsector;

Review Comment:
   ```suggestion
                 readwrite.buffer = (FAR uint8_t *)header->nextsector;
   ```



##########
include/nuttx/contactless/pn532.h:
##########
@@ -57,8 +57,8 @@ struct pn532_config_s
 
   /* External CS, if NULL then SPIDEV_WIRELESS(n) CS is used */
 
-  int (*select)(struct pn532_dev_s *dev, bool sel);
-  int (*irqattach)(void *dev, xcpt_t isr);
+  int (*select)(FAR truct pn532_dev_s *dev, bool sel);
+  int (*irqattach)(FAR void *dev, xcpt_t isr);

Review Comment:
   ```suggestion
     CODE int (*select)(FAR truct pn532_dev_s *dev, bool sel);
     CODE int (*irqattach)(FAR void *dev, xcpt_t isr);
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -562,19 +562,19 @@ static ssize_t smartfs_read(FAR struct file *filep, char 
*buffer,
 
       readwrite.logsector = sf->currsector;
       readwrite.offset = 0;
-      readwrite.buffer = (uint8_t *) fs->fs_rwbuffer;
+      readwrite.buffer = (uint8_t *)fs->fs_rwbuffer;
       readwrite.count = fs->fs_llformat.availbytes;
       ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite);
       if (ret < 0)
         {
           ferr("ERROR: Error %d reading sector %d data\n",
                ret, sf->currsector);
-          goto errout_with_semaphore;
+          goto errout_with_lock;
         }
 
       /* Point header to the read data to get used byte count */
 
-      header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+      header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
         header = (FAR struct smartfs_chain_header_s *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -1406,22 +1406,22 @@ static int smartfs_readdir(FAR struct inode *mountpt,
 
               sdir->fs_curroffset =
                 sizeof(struct smartfs_chain_header_s);
-              header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+              header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
                 header = (FAR struct smartfs_chain_header_s *)fs->fs_rwbuffer;
   ```



##########
include/nuttx/drivers/rwbuffer.h:
##########
@@ -137,7 +137,7 @@ struct rwbuffer_s
   /* This is the state of the read-ahead buffering */
 
 #ifdef CONFIG_DRVR_READAHEAD
-  sem_t         rhsem;           /* Enforces exclusive access to the write 
buffer */
+  mutex_t       rhlock;          /* Enforces exclusive access to the write 
buffer */
   uint8_t      *rhbuffer;        /* Allocated read-ahead buffer */

Review Comment:
   ```suggestion
     FAR uint8_t      *rhbuffer;        /* Allocated read-ahead buffer */
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -1977,21 +1962,21 @@ int smartfs_rename(struct inode *mountpt, const char 
*oldrelpath,
                                 NULL);
       if (ret != OK)
         {
-          goto errout_with_semaphore;
+          goto errout_with_lock;
         }
 
       /* Now mark the old entry as inactive */
 
       readwrite.logsector = oldentry.dsector;
       readwrite.offset = 0;
       readwrite.count = fs->fs_llformat.availbytes;
-      readwrite.buffer = (uint8_t *) fs->fs_rwbuffer;
+      readwrite.buffer = (uint8_t *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
         readwrite.buffer = (FAR uint8_t *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -902,22 +902,22 @@ static ssize_t smartfs_write(FAR struct file *filep, 
const char *buffer,
               if (ret < 0)
                 {
                   ferr("ERROR: Error %d allocating new sector\n", ret);
-                  goto errout_with_semaphore;
+                  goto errout_with_lock;
                 }
 
               /* Copy the new sector to the old one and chain it */
 
-              header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+              header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;
               SMARTFS_SET_NEXTSECTOR(header, ret);
               readwrite.offset = offsetof(struct smartfs_chain_header_s,
                 nextsector);
-              readwrite.buffer = (uint8_t *) header->nextsector;
+              readwrite.buffer = (uint8_t *)header->nextsector;
               readwrite.count = sizeof(uint16_t);
               ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite);

Review Comment:
   ```suggestion
                 ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long)&readwrite);
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -405,8 +387,8 @@ int smartfs_unmount(struct smartfs_mountpt_s *fs)
 
       /* Set the buffer's to invalid value to catch program bugs */
 
-      fs->fs_rwbuffer = (char *) 0xdeadbeef;
-      fs->fs_workbuffer = (char *) 0xdeadbeef;
+      fs->fs_rwbuffer = (char *)0xdeadbeef;
+      fs->fs_workbuffer = (char *)0xdeadbeef;

Review Comment:
   ```suggestion
         fs->fs_rwbuffer = (FAR char *)0xdeadbeef;
         fs->fs_workbuffer = (FAR char *)0xdeadbeef;
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -284,8 +266,8 @@ int smartfs_mount(struct smartfs_mountpt_s *fs, bool 
writeable)
   g_mounthead = fs;
 #endif
 
-  fs->fs_rwbuffer = (char *) kmm_malloc(fs->fs_llformat.availbytes);
-  fs->fs_workbuffer = (char *) kmm_malloc(WORKBUFFER_SIZE);
+  fs->fs_rwbuffer = (char *)kmm_malloc(fs->fs_llformat.availbytes);
+  fs->fs_workbuffer = (char *)kmm_malloc(WORKBUFFER_SIZE);

Review Comment:
   ```suggestion
     fs->fs_rwbuffer = (FAR char *)kmm_malloc(fs->fs_llformat.availbytes);
     fs->fs_workbuffer = (FAR char *)kmm_malloc(WORKBUFFER_SIZE);
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -2006,26 +1991,26 @@ int smartfs_rename(struct inode *mountpt, const char 
*oldrelpath,
 
       readwrite.offset = oldentry.doffset;
       readwrite.count = sizeof(direntry->flags);
-      readwrite.buffer = (uint8_t *) &direntry->flags;
+      readwrite.buffer = (uint8_t *)&direntry->flags;

Review Comment:
   ```suggestion
         readwrite.buffer = (FAR uint8_t *)&direntry->flags;
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -597,7 +579,7 @@ int smartfs_finddirentry(struct smartfs_mountpt_s *fs,
 
               /* Point to next sector in chain */
 
-              header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+              header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
                 header = (FAR struct smartfs_chain_header_s *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -1121,15 +1103,15 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s 
*fs,
 int smartfs_deleteentry(struct smartfs_mountpt_s *fs,
         struct smartfs_entry_s *entry)
 {
-  int                             ret;
-  uint16_t                        nextsector;
-  uint16_t                        sector;
-  uint16_t                        count;
-  uint16_t                        entrysize;
-  uint16_t                        offset;
-  struct smartfs_entry_header_s  *direntry;
-  struct smartfs_chain_header_s  *header;
-  struct smart_read_write_s       readwrite;
+  int                            ret;
+  uint16_t                       nextsector;
+  uint16_t                       sector;
+  uint16_t                       count;
+  uint16_t                       entrysize;
+  uint16_t                       offset;
+  struct smartfs_entry_header_s *direntry;
+  struct smartfs_chain_header_s *header;

Review Comment:
   ```suggestion
     FAR struct smartfs_entry_header_s *direntry;
     FAR struct smartfs_chain_header_s *header;
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -880,7 +862,7 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s *fs,
       readwrite.logsector = psector;
       readwrite.count = fs->fs_llformat.availbytes;
       readwrite.offset = 0;
-      readwrite.buffer = (uint8_t *) fs->fs_rwbuffer;
+      readwrite.buffer = (uint8_t *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
         readwrite.buffer = (FAR uint8_t *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -1406,22 +1406,22 @@ static int smartfs_readdir(FAR struct inode *mountpt,
 
               sdir->fs_curroffset =
                 sizeof(struct smartfs_chain_header_s);
-              header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+              header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;
               sdir->fs_currsector = SMARTFS_NEXTSECTOR(header);
             }
 
           /* Now exit */
 
           ret = OK;
-          goto errout_with_semaphore;
+          goto errout_with_lock;
         }
 
       /* No more entries in this sector.  Move on to next sector and
        * continue the search.  If no more sectors, then we are all
        * done and will report ENOENT.
        */
 
-      header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+      header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
         header = (FAR struct smartfs_chain_header_s *)fs->fs_rwbuffer;
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -1121,15 +1103,15 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s 
*fs,
 int smartfs_deleteentry(struct smartfs_mountpt_s *fs,
         struct smartfs_entry_s *entry)

Review Comment:
   ```suggestion
   int smartfs_deleteentry(FAR struct smartfs_mountpt_s *fs,
                           FAR struct smartfs_entry_s *entry)
   ```



##########
fs/smartfs/smartfs_smart.c:
##########
@@ -846,20 +846,20 @@ static ssize_t smartfs_write(FAR struct file *filep, 
const char *buffer,
           if (ret < 0)
             {
               ferr("ERROR: Error %d allocating new sector\n", ret);
-              goto errout_with_semaphore;
+              goto errout_with_lock;
             }
 
           /* Copy the new sector to the old one and chain it */
 
-          header = (struct smartfs_chain_header_s *) sf->buffer;
+          header = (struct smartfs_chain_header_s *)sf->buffer;

Review Comment:
   ```suggestion
             header = (FAR struct smartfs_chain_header_s *)sf->buffer;
   ```



##########
fs/spiffs/src/spiffs_core.c:
##########
@@ -1191,7 +1191,7 @@ int spiffs_page_move(FAR struct spiffs_s *fs,
       *dst_pgndx = free_pgndx;
     }
 
-  phdr = page_data ? (struct spiffs_page_header_s *) page_data : page_hdr;
+  phdr = page_data ? (struct spiffs_page_header_s *)page_data : page_hdr;

Review Comment:
   ```suggestion
     phdr = page_data ? (FAR struct spiffs_page_header_s *)page_data : page_hdr;
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -889,7 +871,7 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s *fs,
 
       /* Get the next chained sector */
 
-      chainheader = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+      chainheader = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
         chainheader = (FAR struct smartfs_chain_header_s *)fs->fs_rwbuffer;
   ```



##########
fs/spiffs/src/spiffs_core.c:
##########
@@ -183,7 +183,7 @@ static int spiffs_page_index_check(FAR struct spiffs_s *fs,
 #ifdef CONFIG_SPIFFS_PAGE_CHECK
   ret = spiffs_cache_read(fs, SPIFFS_OP_T_OBJNDX | SPIFFS_OP_C_READ,
                    fobj->objid, SPIFFS_PAGE_TO_PADDR(fs, pgndx),
-                   sizeof(struct spiffs_page_header_s), (uint8_t *) & ph);
+                   sizeof(struct spiffs_page_header_s), (uint8_t *)&ph);

Review Comment:
   ```suggestion
                      sizeof(struct spiffs_page_header_s), (FAR uint8_t *)&ph);
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -2030,7 +2012,7 @@ int smartfs_extendfile(FAR struct smartfs_mountpt_s *fs,
 
           /* Copy the new sector to the old one and chain it */
 
-          header = (struct smartfs_chain_header_s *) sf->buffer;
+          header = (struct smartfs_chain_header_s *)sf->buffer;

Review Comment:
   ```suggestion
             header = (FAR struct smartfs_chain_header_s *)sf->buffer;
   ```



##########
fs/smartfs/smartfs_utils.c:
##########
@@ -1639,7 +1621,7 @@ off_t smartfs_seek_internal(FAR struct smartfs_mountpt_s 
*fs,
       sf->filepos = 0;
     }
 
-  header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer;
+  header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer;

Review Comment:
   ```suggestion
     header = (FAR struct smartfs_chain_header_s *)fs->fs_rwbuffer;
   ```



##########
fs/vfs/fs_timerfd.c:
##########
@@ -61,7 +62,7 @@ typedef struct timerfd_waiter_sem_s
 
 struct timerfd_priv_s
 {
-  sem_t         exclsem;        /* Enforces device exclusive access */
+  mutex_t       lock;           /* Enforces device exclusive access */
   timerfd_waiter_sem_t *rdsems; /* List of blocking readers */

Review Comment:
   ```suggestion
     FAR timerfd_waiter_sem_t *rdsems; /* List of blocking readers */
   ```



##########
fs/spiffs/src/spiffs_gc.c:
##########
@@ -160,7 +160,7 @@ static int spiffs_gc_erase_block(FAR struct spiffs_s *fs, 
int16_t blkndx)
 
 static int spiffs_gc_epage_stats(FAR struct spiffs_s *fs, int16_t blkndx)
 {
-  FAR int16_t *objlu_buf = (int16_t *) fs->lu_work;
+  FAR int16_t *objlu_buf = (int16_t *)fs->lu_work;

Review Comment:
   ```suggestion
     FAR int16_t *objlu_buf = (FAR int16_t *)fs->lu_work;
   ```



##########
fs/vfs/fs_eventfd.c:
##########
@@ -50,7 +50,7 @@ typedef struct eventfd_waiter_sem_s
 
 struct eventfd_priv_s
 {
-  sem_t     exclsem;            /* Enforces device exclusive access */
+  mutex_t     lock;             /* Enforces device exclusive access */
   eventfd_waiter_sem_t *rdsems; /* List of blocking readers */
   eventfd_waiter_sem_t *wrsems; /* List of blocking writers */

Review Comment:
   ```suggestion
     FAR eventfd_waiter_sem_t *rdsems; /* List of blocking readers */
     FAR eventfd_waiter_sem_t *wrsems; /* List of blocking writers */
   ```



##########
fs/spiffs/src/spiffs_gc.c:
##########
@@ -993,7 +993,7 @@ static int spiffs_gc_clean(FAR struct spiffs_s *fs, int16_t 
blkndx)
 
 int spiffs_gc_quick(FAR struct spiffs_s *fs, uint16_t max_free_pages)
 {
-  FAR int16_t *objlu_buf  = (int16_t *) fs->lu_work;
+  FAR int16_t *objlu_buf  = (int16_t *)fs->lu_work;

Review Comment:
   ```suggestion
     FAR int16_t *objlu_buf  = (FAR int16_t *)fs->lu_work;
   ```



##########
graphics/nxterm/nxterm.h:
##########
@@ -110,7 +110,7 @@ struct nxterm_state_s
   FAR const struct nxterm_operations_s *ops; /* Window operations */
   FAR void *handle;                          /* The window handle */
   FAR struct nxterm_window_s wndo;           /* Describes the window and font 
*/

Review Comment:
   ```suggestion
     struct nxterm_window_s wndo;           /* Describes the window and font */
   ```



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

Reply via email to