From 6548b41cab6e9824baadeeef1e8cbd3be37f6020 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 15 Apr 2020 08:41:49 -0600 Subject: [PATCH] drivers/usbdev/usbmsc.c: Run nxstyle; fix complaints. --- drivers/usbdev/usbmsc.c | 44 ++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/drivers/usbdev/usbmsc.c b/drivers/usbdev/usbmsc.c index 2d31a12e4b..b183cc0980 100644 --- a/drivers/usbdev/usbmsc.c +++ b/drivers/usbdev/usbmsc.c @@ -73,10 +73,6 @@ # include "composite.h" #endif -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Private Types ****************************************************************************/ @@ -146,14 +142,12 @@ static struct usbdevclass_driverops_s g_driverops = NULL /* resume */ }; -/* Used to hand-off the state structure when the SCSI worker thread is started */ +/* Used to hand-off the state structure when the SCSI worker thread is + * started. + */ FAR struct usbmsc_dev_s *g_usbmsc_handoff; -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -226,10 +220,6 @@ static void usbmsc_freereq(FAR struct usbdev_ep_s *ep, } } -/**************************************************************************** - * Class Driver Interfaces - ****************************************************************************/ - /**************************************************************************** * Name: usbmsc_bind * @@ -358,7 +348,9 @@ static int usbmsc_bind(FAR struct usbdevclass_driver_s *driver, leave_critical_section(flags); } - /* Report if we are selfpowered (unless we are part of a composite device) */ + /* Report if we are selfpowered (unless we are part of a composite + * device). + */ #ifndef CONFIG_USBMSC_COMPOSITE #ifdef CONFIG_USBDEV_SELFPOWERED @@ -895,10 +887,6 @@ static void usbmsc_disconnect(FAR struct usbdevclass_driver_s *driver, #endif } -/**************************************************************************** - * Initialization/Un-Initialization - ****************************************************************************/ - /**************************************************************************** * Name: usbmsc_lununinitialize ****************************************************************************/ @@ -921,10 +909,6 @@ static void usbmsc_lununinitialize(struct usbmsc_lun_s *lun) * Public Functions ****************************************************************************/ -/**************************************************************************** - * Internal Interfaces - ****************************************************************************/ - /**************************************************************************** * Name: usbmsc_setconfig * @@ -1170,7 +1154,9 @@ void usbmsc_rdcomplete(FAR struct usbdev_ep_s *ep, sq_addlast((FAR sq_entry_t *)privreq, &priv->rdreqlist); leave_critical_section(flags); - /* Signal the worker thread that there is received data to be processed */ + /* Signal the worker thread that there is received data to be + * processed. + */ priv->theventset |= USBMSC_EVENT_RDCOMPLETE; usbmsc_scsi_signal(priv); @@ -1287,10 +1273,6 @@ static int usbmsc_sync_wait(FAR struct usbmsc_dev_s *priv) return nxsem_wait_uninterruptible(&priv->thsynch); } -/**************************************************************************** - * User Interfaces - ****************************************************************************/ - /**************************************************************************** * Name: usbmsc_configure * @@ -1562,7 +1544,9 @@ int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath, lun->sectorsize = geo.geo_sectorsize; lun->readonly = readonly; - /* If the driver does not support the write method, then this is read-only */ + /* If the driver does not support the write method, then this is read- + * only. + */ if (!inode->u.i_bops->write) { @@ -1724,7 +1708,9 @@ int usbmsc_exportluns(FAR void *handle) DEBUGASSERT(g_usbmsc_handoff == NULL); - /* Register the USB storage class driver (unless we are part of a composite device) */ + /* Register the USB storage class driver (unless we are part of a composite + * device). + */ #ifndef CONFIG_USBMSC_COMPOSITE ret = usbdev_register(&drvr->drvr);