pkarashchenko commented on code in PR #6965: URL: https://github.com/apache/incubator-nuttx/pull/6965#discussion_r989413849
########## drivers/audio/audio_null.c: ########## @@ -825,7 +825,7 @@ static int null_release(FAR struct audio_lowerhalf_s *dev) #endif { FAR struct null_dev_s *priv = (FAR struct null_dev_s *)dev; - void *value; + void *value; Review Comment: ```suggestion FAR void *value; ``` ########## drivers/audio/vs1053.c: ########## @@ -1797,8 +1796,8 @@ static int vs1053_release(FAR struct audio_lowerhalf_s *lower, static int vs1053_release(FAR struct audio_lowerhalf_s *lower) #endif { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; - void *value; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)lower; ``` ########## drivers/audio/vs1053.c: ########## @@ -1591,7 +1591,7 @@ static int vs1053_pause(FAR struct audio_lowerhalf_s *lower, static int vs1053_pause(FAR struct audio_lowerhalf_s *lower) #endif { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)lower; ``` ########## drivers/audio/vs1053.c: ########## @@ -1546,7 +1546,7 @@ static int vs1053_stop(FAR struct audio_lowerhalf_s *lower, static int vs1053_stop(FAR struct audio_lowerhalf_s *lower) #endif { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)lower; ``` ########## drivers/audio/vs1053.c: ########## @@ -1280,7 +1280,7 @@ static int vs1053_dreq_isr(int irq, FAR void *context, FAR void *arg) static void *vs1053_workerthread(pthread_addr_t pvarg) { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) pvarg; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)pvarg; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)pvarg; ``` ########## drivers/audio/vs1053.c: ########## @@ -1751,12 +1751,12 @@ static int vs1053_reserve(FAR struct audio_lowerhalf_s *lower, static int vs1053_reserve(FAR struct audio_lowerhalf_s *lower) #endif { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)lower; ``` ########## drivers/leds/ws2812.c: ########## @@ -143,9 +144,9 @@ static void ws2812_pack(FAR uint8_t *buf, uint32_t rgb); #ifdef CONFIG_WS2812_NON_SPI_DRIVER -static ssize_t ws2812_open(FAR struct file *filep); +static ssize_t ws2812_open(FAR struct file *filep); Review Comment: ```suggestion static ssize_t ws2812_open(FAR struct file *filep); ``` ########## drivers/leds/ws2812.c: ########## @@ -143,9 +144,9 @@ static void ws2812_pack(FAR uint8_t *buf, uint32_t rgb); #ifdef CONFIG_WS2812_NON_SPI_DRIVER -static ssize_t ws2812_open(FAR struct file *filep); +static ssize_t ws2812_open(FAR struct file *filep); -static ssize_t ws2812_close(FAR struct file *filep); +static ssize_t ws2812_close(FAR struct file *filep); Review Comment: ```suggestion static ssize_t ws2812_close(FAR struct file *filep); ``` ########## drivers/video/video_framebuff.c: ########## @@ -154,26 +154,25 @@ vbuf_container_t *video_framebuff_get_container(video_framebuff_t *fbuf) { vbuf_container_t *ret; - nxsem_wait_uninterruptible(&fbuf->lock_empty); + nxmutex_lock(&fbuf->lock_empty); ret = fbuf->vbuf_empty; if (ret) { fbuf->vbuf_empty = ret->next; ret->next = NULL; } - nxsem_post(&fbuf->lock_empty); - + nxmutex_unlock(&fbuf->lock_empty); return ret; } void video_framebuff_free_container(video_framebuff_t *fbuf, vbuf_container_t *cnt) { - nxsem_wait_uninterruptible(&fbuf->lock_empty); + nxmutex_lock(&fbuf->lock_empty); cnt->next = fbuf->vbuf_empty; fbuf->vbuf_empty = cnt; - nxsem_post(&fbuf->lock_empty); + nxmutex_unlock(&fbuf->lock_empty); } void video_framebuff_queue_container(video_framebuff_t *fbuf, Review Comment: ```suggestion void video_framebuff_queue_container(FAR video_framebuff_t *fbuf, ``` ########## drivers/video/vnc/vnc_updater.c: ########## @@ -48,6 +48,9 @@ #include <debug.h> #include <nuttx/queue.h> +#ifdef VNCSERVER_SEM_DEBUG +#include <nuttx/mutex.h> Review Comment: ```suggestion # include <nuttx/mutex.h> ``` ########## drivers/audio/vs1053.c: ########## @@ -956,12 +956,12 @@ static int vs1053_shutdown(FAR struct audio_lowerhalf_s *lower) static void vs1053_feeddata(FAR struct vs1053_struct_s *dev) { - int bytecount; - int ret; - uint8_t *samp = NULL; - uint16_t reg; - struct ap_buffer_s *apb; - FAR struct spi_dev_s *spi = dev->spi; + int bytecount; + int ret; + uint8_t *samp = NULL; + uint16_t reg; + struct ap_buffer_s *apb; Review Comment: ```suggestion FAR struct ap_buffer_s *apb; ``` ########## drivers/audio/vs1053.c: ########## @@ -1621,7 +1621,7 @@ static int vs1053_resume(FAR struct audio_lowerhalf_s *lower, static int vs1053_resume(FAR struct audio_lowerhalf_s *lower) #endif { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)lower; ``` ########## drivers/audio/vs1053.c: ########## @@ -1751,12 +1751,12 @@ static int vs1053_reserve(FAR struct audio_lowerhalf_s *lower, static int vs1053_reserve(FAR struct audio_lowerhalf_s *lower) #endif { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; int ret; Review Comment: ```suggestion int ret; ``` ########## drivers/video/video_framebuff.c: ########## @@ -103,13 +103,13 @@ void video_framebuff_init(video_framebuff_t *fbuf) fbuf->vbuf_tail = NULL; fbuf->vbuf_next = NULL; - nxsem_init(&fbuf->lock_empty, 0, 1); + nxmutex_init(&fbuf->lock_empty); } void video_framebuff_uninit(video_framebuff_t *fbuf) Review Comment: ```suggestion void video_framebuff_uninit(FAR video_framebuff_t *fbuf) ``` ########## drivers/audio/vs1053.c: ########## @@ -1439,7 +1439,7 @@ static int vs1053_start(FAR struct audio_lowerhalf_s *lower, static int vs1053_start(FAR struct audio_lowerhalf_s *lower) #endif { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)lower; ``` ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c: ########## @@ -185,7 +185,7 @@ int bcmf_gspi_read_f2_frame(FAR struct bcmf_dev_s *priv, gspi_f2_dma, 0, frame_length, - (uint32_t *) iframe->data); + (uint32_t *)iframe->data); Review Comment: ```suggestion (FAR uint32_t *)iframe->data); ``` ########## drivers/audio/vs1053.c: ########## @@ -775,7 +775,7 @@ static int vs1053_configure(FAR struct audio_lowerhalf_s *lower, { int ret = OK; Review Comment: ```suggestion int ret = OK; ``` ########## drivers/audio/wm8994.c: ########## @@ -1727,7 +1711,7 @@ static int wm8994_interrupt(FAR const struct wm8994_lower_s *lower, static void *wm8994_workerthread(pthread_addr_t pvarg) { - FAR struct wm8994_dev_s *priv = (struct wm8994_dev_s *) pvarg; + FAR struct wm8994_dev_s *priv = (struct wm8994_dev_s *)pvarg; Review Comment: ```suggestion FAR struct wm8994_dev_s *priv = (FAR struct wm8994_dev_s *)pvarg; ``` ########## drivers/audio/vs1053.c: ########## @@ -956,12 +956,12 @@ static int vs1053_shutdown(FAR struct audio_lowerhalf_s *lower) static void vs1053_feeddata(FAR struct vs1053_struct_s *dev) { - int bytecount; - int ret; - uint8_t *samp = NULL; - uint16_t reg; - struct ap_buffer_s *apb; - FAR struct spi_dev_s *spi = dev->spi; + int bytecount; + int ret; + uint8_t *samp = NULL; Review Comment: ```suggestion FAR uint8_t *samp = NULL; ``` ########## drivers/audio/vs1053.c: ########## @@ -934,8 +934,8 @@ static int vs1053_hardreset(FAR struct vs1053_struct_s *dev) static int vs1053_shutdown(FAR struct audio_lowerhalf_s *lower) { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; - FAR struct spi_dev_s *spi = dev->spi; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)lower; ``` ########## drivers/audio/wm8994.c: ########## @@ -1603,7 +1587,7 @@ static int wm8994_release(FAR struct audio_lowerhalf_s *dev) #endif { FAR struct wm8994_dev_s *priv = (FAR struct wm8994_dev_s *)dev; - void *value; + void *value; Review Comment: ```suggestion FAR void *value; ``` ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_sdpcm.c: ########## @@ -511,7 +511,7 @@ struct bcmf_frame_s *bcmf_sdpcm_get_rx_frame(FAR struct bcmf_dev_s *priv) bcmf_interface_frame_t *iframe; Review Comment: ```suggestion FAR bcmf_interface_frame_t *iframe; ``` ########## drivers/lcd/apa102.c: ########## @@ -375,7 +375,7 @@ static inline void apa102_refresh(FAR struct apa102_dev_s *priv) for (i = 0; i < (APA102_XRES * APA102_YRES); i++) { - uint32_t *led = (uint32_t *) &priv->fb[i]; + uint32_t *led = (uint32_t *)&priv->fb[i]; Review Comment: ```suggestion FAR uint32_t *led = (FAR uint32_t *)&priv->fb[i]; ``` ########## drivers/sensors/bmp180.c: ########## @@ -276,7 +276,7 @@ static void bmp180_putreg8(FAR struct bmp180_dev_s *priv, uint8_t regaddr, /* Write the register address and value */ - ret = i2c_write(priv->i2c, &config, (uint8_t *) &data, 2); + ret = i2c_write(priv->i2c, &config, (uint8_t *)&data, 2); Review Comment: ```suggestion ret = i2c_write(priv->i2c, &config, (FAR uint8_t *)&data, 2); ``` ########## drivers/audio/vs1053.c: ########## @@ -1797,8 +1796,8 @@ static int vs1053_release(FAR struct audio_lowerhalf_s *lower, static int vs1053_release(FAR struct audio_lowerhalf_s *lower) #endif { - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; - void *value; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; + void *value; Review Comment: ```suggestion FAR void *value; ``` ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_sdpcm.c: ########## @@ -376,14 +376,14 @@ int bcmf_sdpcm_sendframe(FAR struct bcmf_dev_s *priv) return -EAGAIN; } - if (nxsem_wait_uninterruptible(&ibus->queue_mutex) < 0) + if (nxmutex_lock(&ibus->queue_lock) < 0) { DEBUGPANIC(); } iframe = list_remove_head_type(&ibus->tx_queue, bcmf_interface_frame_t, list_entry); - nxsem_post(&ibus->queue_mutex); + nxmutex_unlock(&ibus->queue_lock); header = (struct bcmf_sdpcm_header *)iframe->header.base; Review Comment: ```suggestion header = (FAR struct bcmf_sdpcm_header *)iframe->header.base; ``` ########## drivers/sensors/mlx90614.c: ########## @@ -131,7 +131,7 @@ static int mlx90614_read_word(FAR struct mlx90614_dev_s *priv, uint8_t cmd, /* Point "buffer" to checkcrc[3] to fill it with received bytes */ - buffer = (uint8_t *) &checkcrc[3]; + buffer = (uint8_t *)&checkcrc[3]; Review Comment: ```suggestion buffer = (FAR uint8_t *)&checkcrc[3]; ``` ########## drivers/audio/vs1053.c: ########## @@ -775,7 +775,7 @@ static int vs1053_configure(FAR struct audio_lowerhalf_s *lower, { int ret = OK; #if !defined(CONFIG_AUDIO_EXCLUDE_VOLUME) || !defined(CONFIG_AUDIO_EXCLUDE_TONE) - FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; + FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *)lower; Review Comment: ```suggestion FAR struct vs1053_struct_s *dev = (FAR struct vs1053_struct_s *)lower; ``` ########## drivers/video/video.c: ########## @@ -113,7 +114,7 @@ typedef struct video_format_s video_format_t; struct video_type_inf_s { - sem_t lock_state; + mutex_t lock_state; Review Comment: ```suggestion mutex_t lock_state; ``` ########## drivers/usbhost/usbhost_xboxcontroller.c: ########## @@ -318,56 +312,14 @@ static uint32_t g_devinuse; /* The following are used to managed the class creation operation */ -static sem_t g_exclsem; /* For mutually exclusive thread creation */ -static sem_t g_syncsem; /* Thread data passing interlock */ -static struct usbhost_state_s *g_priv; /* Data passed to thread */ +static mutex_t g_lock = NXMUTEX_INITIALIZER; +static sem_t g_syncsem = NXSEM_INITIALIZER(0, PRIOINHERIT_FLAGS_DISABLE); +static struct usbhost_state_s *g_priv; Review Comment: ```suggestion static FAR struct usbhost_state_s *g_priv; ``` ########## drivers/usbdev/usbmsc_desc.c: ########## @@ -369,7 +369,7 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf, { /* Single interface descriptor */ - FAR struct usb_ifdesc_s * dest = (struct usb_ifdesc_s *)buf; + FAR struct usb_ifdesc_s *dest = (struct usb_ifdesc_s *)buf; Review Comment: ```suggestion FAR struct usb_ifdesc_s *dest = (FAR struct usb_ifdesc_s *)buf; ``` ########## drivers/syslog/syslog_device.c: ########## @@ -144,15 +144,6 @@ static inline int syslog_dev_takesem(FAR struct syslog_dev_s *syslog_dev) return nxrmutex_lock(&syslog_dev->sl_lock); } -/**************************************************************************** - * Name: syslog_dev_givesem - ****************************************************************************/ - -static inline void syslog_dev_givesem(FAR struct syslog_dev_s *syslog_dev) Review Comment: Let's keep naming and add `#define syslog_dev_givesem nxrmutex_unlock` ########## drivers/usbhost/usbhost_hidmouse.c: ########## @@ -409,60 +404,18 @@ static const struct file_operations g_hidmouse_fops = /* This is a bitmap that is used to allocate device names /dev/mouse0-31. */ -static uint32_t g_devinuse; +static uint32_t g_devinuse; /* The following are used to managed the class creation operation */ -static sem_t g_exclsem; /* For mutually exclusive thread creation */ -static sem_t g_syncsem; /* Thread data passing interlock */ -static struct usbhost_state_s *g_priv; /* Data passed to thread */ +static mutex_t g_lock = NXMUTEX_INITIALIZER; +static sem_t g_syncsem = NXSEM_INITIALIZER(0, PRIOINHERIT_FLAGS_DISABLE); +static struct usbhost_state_s *g_priv; Review Comment: ```suggestion static FAR struct usbhost_state_s *g_priv; ``` ########## drivers/video/video_framebuff.c: ########## @@ -103,13 +103,13 @@ void video_framebuff_init(video_framebuff_t *fbuf) fbuf->vbuf_tail = NULL; fbuf->vbuf_next = NULL; - nxsem_init(&fbuf->lock_empty, 0, 1); + nxmutex_init(&fbuf->lock_empty); } void video_framebuff_uninit(video_framebuff_t *fbuf) { video_framebuff_realloc_container(fbuf, 0); - nxsem_destroy(&fbuf->lock_empty); + nxmutex_destroy(&fbuf->lock_empty); } int video_framebuff_realloc_container(video_framebuff_t *fbuf, int sz) Review Comment: ```suggestion int video_framebuff_realloc_container(FAR video_framebuff_t *fbuf, int sz) ``` ########## drivers/usbmisc/fusb301.c: ########## @@ -529,7 +530,7 @@ static ssize_t fusb301_read(FAR struct file *filep, ptr = (struct fusb301_result_s *)buffer; Review Comment: ```suggestion ptr = (FAR struct fusb301_result_s *)buffer; ``` ########## drivers/usbhost/usbhost_max3421e.c: ########## @@ -419,13 +414,6 @@ static void max3421e_sndblock(FAR struct max3421e_usbhost_s *priv, # define max3421e_pktdump(m,b,n) #endif -/* Semaphores ***************************************************************/ - -static int max3421e_takesem(FAR sem_t *sem); -#define max3421e_givesem(s) nxsem_post(s); -static int max3421e_take_exclsem(FAR struct max3421e_usbhost_s *priv); -static void max3421e_give_exclsem(FAR struct max3421e_usbhost_s *priv); - /* Byte stream access helper functions **************************************/ static inline uint16_t max3421e_getle16(const uint8_t *val); Review Comment: ```suggestion static inline uint16_t max3421e_getle16(FAR const uint8_t *val); ``` ########## drivers/usbhost/usbhost_hidkbd.c: ########## @@ -362,9 +357,9 @@ static uint32_t g_devinuse; /* The following are used to managed the class creation operation */ -static sem_t g_exclsem; /* For mutually exclusive thread creation */ -static sem_t g_syncsem; /* Thread data passing interlock */ -static struct usbhost_state_s *g_priv; /* Data passed to thread */ +static mutex_t g_lock = NXMUTEX_INITIALIZER; +static sem_t g_syncsem = NXSEM_INITIALIZER(0, PRIOINHERIT_FLAGS_DISABLE); +static struct usbhost_state_s *g_priv; Review Comment: ```suggestion static FAR struct usbhost_state_s *g_priv; ``` ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_utils.h: ########## @@ -43,8 +41,6 @@ void bcmf_hexdump(uint8_t *data, unsigned int len, unsigned long offset); -int bcmf_sem_wait(sem_t *sem, unsigned int timeout_ms); - static inline uint16_t bcmf_getle16(void *val) { uint8_t *valb = (uint8_t *)val; Review Comment: ```suggestion FAR uint8_t *valb = (FAR uint8_t *)val; ``` ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_utils.h: ########## @@ -43,8 +41,6 @@ void bcmf_hexdump(uint8_t *data, unsigned int len, unsigned long offset); -int bcmf_sem_wait(sem_t *sem, unsigned int timeout_ms); - static inline uint16_t bcmf_getle16(void *val) Review Comment: ```suggestion static inline uint16_t bcmf_getle16(FAR void *val) ``` ########## drivers/video/video_framebuff.c: ########## @@ -252,7 +251,7 @@ void video_framebuff_capture_done(video_framebuff_t *fbuf) } } -void video_framebuff_change_mode(video_framebuff_t *fbuf, +void video_framebuff_change_mode(video_framebuff_t *fbuf, Review Comment: ```suggestion void video_framebuff_change_mode(FAR video_framebuff_t *fbuf, ``` ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_utils.h: ########## @@ -43,8 +41,6 @@ void bcmf_hexdump(uint8_t *data, unsigned int len, unsigned long offset); Review Comment: ```suggestion void bcmf_hexdump(FAR uint8_t *data, unsigned int len, unsigned long offset); ``` ########## drivers/wireless/lpwan/sx127x/sx127x.c: ########## @@ -867,8 +868,7 @@ static ssize_t sx127x_read(FAR struct file *filep, FAR char *buffer, ret = sx127x_rxfifo_get(dev, (uint8_t *)buffer, buflen); Review Comment: ```suggestion ret = sx127x_rxfifo_get(dev, (FAR uint8_t *)buffer, buflen); ``` ########## drivers/video/video_framebuff.c: ########## @@ -154,26 +154,25 @@ vbuf_container_t *video_framebuff_get_container(video_framebuff_t *fbuf) { vbuf_container_t *ret; - nxsem_wait_uninterruptible(&fbuf->lock_empty); + nxmutex_lock(&fbuf->lock_empty); ret = fbuf->vbuf_empty; if (ret) { fbuf->vbuf_empty = ret->next; ret->next = NULL; } - nxsem_post(&fbuf->lock_empty); - + nxmutex_unlock(&fbuf->lock_empty); return ret; } void video_framebuff_free_container(video_framebuff_t *fbuf, vbuf_container_t *cnt) Review Comment: ```suggestion void video_framebuff_free_container(FAR video_framebuff_t *fbuf, FAR vbuf_container_t *cnt) ``` ########## drivers/wireless/lpwan/sx127x/sx127x.c: ########## @@ -493,7 +494,7 @@ static void sx127x_unlock(FAR struct spi_dev_s *spi) * Name: sx127x_select ****************************************************************************/ -static inline void sx127x_select(struct sx127x_dev_s * dev) +static inline void sx127x_select(struct sx127x_dev_s *dev) Review Comment: ```suggestion static inline void sx127x_select(FAR struct sx127x_dev_s *dev) ``` ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c: ########## @@ -1804,8 +1781,8 @@ int bcmf_wl_set_ssid(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) WLC_DISASSOC, (uint8_t *)&scbval, &out_len); Review Comment: ```suggestion WLC_DISASSOC, (FAR uint8_t *)&scbval, &out_len); ``` ########## drivers/wireless/nrf24l01.c: ########## @@ -1055,7 +1056,7 @@ static ssize_t nrf24l01_read(FAR struct file *filep, FAR char *buffer, ret = nrf24l01_recv(dev, (uint8_t *)buffer, buflen, &dev->last_recvpipeno); Review Comment: ```suggestion ret = nrf24l01_recv(dev, (FAR uint8_t *)buffer, buflen, &dev->last_recvpipeno); ``` ########## drivers/wireless/nrf24l01.c: ########## @@ -1077,15 +1078,15 @@ static ssize_t nrf24l01_write(FAR struct file *filep, FAR const char *buffer, DEBUGASSERT(inode && inode->i_private); dev = (FAR struct nrf24l01_dev_s *)inode->i_private; - ret = nxsem_wait(&dev->devsem); + ret = nxmutex_lock(&dev->devlock); if (ret < 0) { return ret; } ret = nrf24l01_send(dev, (const uint8_t *)buffer, buflen); Review Comment: ```suggestion ret = nrf24l01_send(dev, (FAR const uint8_t *)buffer, buflen); ``` ########## fs/nfs/nfs_mount.h: ########## @@ -68,7 +68,7 @@ struct nfsmount { FAR struct nfsnode *nm_head; /* A list of all files opened on this mountpoint */ - sem_t nm_sem; /* Used to assure thread-safe access */ + mutex_t nm_lock; /* Used to assure thread-safe access */ nfsfh_t *nm_fh; /* File handle of root dir */ Review Comment: ```suggestion FAR nfsfh_t *nm_fh; /* File handle of root dir */ ``` ########## drivers/wireless/nrf24l01.c: ########## @@ -338,7 +339,7 @@ static inline void nrf24l01_select(struct nrf24l01_dev_s * dev) * Name: nrf24l01_deselect ****************************************************************************/ -static inline void nrf24l01_deselect(struct nrf24l01_dev_s * dev) +static inline void nrf24l01_deselect(struct nrf24l01_dev_s *dev) Review Comment: ```suggestion static inline void nrf24l01_deselect(FAR struct nrf24l01_dev_s *dev) ``` ########## fs/fat/fs_fat32.h: ########## @@ -1018,11 +1018,6 @@ EXTERN uint32_t fat_getuint32(uint8_t *ptr); EXTERN void fat_putuint16(uint8_t *ptr, uint16_t value16); EXTERN void fat_putuint32(uint8_t *ptr, uint32_t value32); Review Comment: ```suggestion EXTERN void fat_putuint16(FAR uint8_t *ptr, uint16_t value16); EXTERN void fat_putuint32(FAR uint8_t *ptr, uint32_t value32); ``` -- 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