You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/04/15 15:30:17 UTC
[incubator-nuttx] 02/02: drivers/usbdev/usbmsc.c: Run nxstyle;
fix complaints.
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6548b41cab6e9824baadeeef1e8cbd3be37f6020
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Wed Apr 15 08:41:49 2020 -0600
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 2d31a12..b183cc0 100644
--- a/drivers/usbdev/usbmsc.c
+++ b/drivers/usbdev/usbmsc.c
@@ -74,10 +74,6 @@
#endif
/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
* Private Types
****************************************************************************/
@@ -146,15 +142,13 @@ 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
****************************************************************************/
@@ -227,10 +221,6 @@ static void usbmsc_freereq(FAR struct usbdev_ep_s *ep,
}
/****************************************************************************
- * Class Driver Interfaces
- ****************************************************************************/
-
-/****************************************************************************
* Name: usbmsc_bind
*
* Description:
@@ -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
@@ -896,10 +888,6 @@ static void usbmsc_disconnect(FAR struct usbdevclass_driver_s *driver,
}
/****************************************************************************
- * Initialization/Un-Initialization
- ****************************************************************************/
-
-/****************************************************************************
* Name: usbmsc_lununinitialize
****************************************************************************/
@@ -922,10 +910,6 @@ static void usbmsc_lununinitialize(struct usbmsc_lun_s *lun)
****************************************************************************/
/****************************************************************************
- * Internal Interfaces
- ****************************************************************************/
-
-/****************************************************************************
* Name: usbmsc_setconfig
*
* Description:
@@ -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);
@@ -1288,10 +1274,6 @@ static int usbmsc_sync_wait(FAR struct usbmsc_dev_s *priv)
}
/****************************************************************************
- * User Interfaces
- ****************************************************************************/
-
-/****************************************************************************
* Name: usbmsc_configure
*
* Description:
@@ -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);