mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
global change: fix tools/checkpatch.sh warnnings
Change-Id: I88cfa979c44bcaf3a8f6e036c6bfccd3402ca85a Signed-off-by: ligd <liguiding@fishsemi.com>
This commit is contained in:
@@ -455,7 +455,9 @@ static struct usbhost_cdcacm_s g_prealloc[CONFIG_USBHOST_CDCACM_NPREALLOC];
|
||||
static FAR struct usbhost_freestate_s *g_freelist;
|
||||
#endif
|
||||
|
||||
/* This is a bitmap that is used to allocate device minor numbers /dev/ttyACM[n]. */
|
||||
/* This is a bitmap that is used to allocate device
|
||||
* minor numbers /dev/ttyACM[n].
|
||||
*/
|
||||
|
||||
static uint32_t g_devinuse;
|
||||
|
||||
@@ -1109,7 +1111,9 @@ static void usbhost_rxdata_work(FAR void *arg)
|
||||
while (priv->rxena && !priv->disconnected)
|
||||
#endif
|
||||
{
|
||||
/* Stop now if there is no room for another character in the RX buffer. */
|
||||
/* Stop now if there is no room for another
|
||||
* character in the RX buffer.
|
||||
*/
|
||||
|
||||
if (nexthead == rxbuf->tail)
|
||||
{
|
||||
@@ -1938,11 +1942,15 @@ usbhost_create(FAR struct usbhost_hubport_s *hport,
|
||||
priv->usbclass.connect = usbhost_connect;
|
||||
priv->usbclass.disconnected = usbhost_disconnected;
|
||||
|
||||
/* The initial reference count is 1... One reference is held by the driver */
|
||||
/* The initial reference count is 1...
|
||||
* One reference is held by the driver
|
||||
*/
|
||||
|
||||
priv->crefs = 1;
|
||||
|
||||
/* Initialize semaphores (this works okay in the interrupt context) */
|
||||
/* Initialize semaphores
|
||||
* (this works okay in the interrupt context)
|
||||
*/
|
||||
|
||||
nxsem_init(&priv->exclsem, 0, 1);
|
||||
|
||||
|
||||
@@ -416,7 +416,9 @@ static const uint8_t encoding[USBHID_NUMENCODINGS] =
|
||||
KEYCODE_F11, KEYCODE_F12,
|
||||
KEYCODE_PRTSCRN, KEYCODE_SCROLLLOCK,
|
||||
|
||||
/* 0x48-0x4f: Pause,Insert,Home,PageUp,DeleteForward,End,PageDown,RightArrow */
|
||||
/* 0x48-0x4f: Pause,Insert,Home,PageUp,
|
||||
* DeleteForward,End,PageDown,RightArrow
|
||||
*/
|
||||
|
||||
KEYCODE_PAUSE, KEYCODE_INSERT,
|
||||
KEYCODE_HOME, KEYCODE_PAGEUP,
|
||||
@@ -469,7 +471,9 @@ static const uint8_t encoding[USBHID_NUMENCODINGS] =
|
||||
KEYCODE_COPY, KEYCODE_PASTE,
|
||||
KEYCODE_FIND, KEYCODE_MUTE,
|
||||
|
||||
/* 0x80-0x87: VolUp,VolDown,LCapsLock,lNumLock,LScrollLock,,,=,International1 */
|
||||
/* 0x80-0x87: VolUp,VolDown,LCapsLock,lNumLock,LScrollLock,,,
|
||||
* =,International1
|
||||
*/
|
||||
|
||||
KEYCODE_VOLUP, KEYCODE_VOLDOWN,
|
||||
KEYCODE_LCAPSLOCK, KEYCODE_LNUMLOCK,
|
||||
@@ -1481,7 +1485,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv,
|
||||
uinfo("Interface descriptor\n");
|
||||
DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC);
|
||||
|
||||
/* Did we already find what we needed from a preceding interface? */
|
||||
/* Did we already find what we needed
|
||||
* from a preceding interface?
|
||||
*/
|
||||
|
||||
if ((found & USBHOST_RQDFOUND) == USBHOST_RQDFOUND)
|
||||
{
|
||||
@@ -1605,7 +1611,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv,
|
||||
|
||||
if (found == USBHOST_ALLFOUND)
|
||||
{
|
||||
/* Yes.. then break out of the loop and use the preceding interface */
|
||||
/* Yes.. then break out of the loop
|
||||
* and use the preceding interface
|
||||
*/
|
||||
|
||||
done = true;
|
||||
}
|
||||
@@ -1681,7 +1689,9 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv)
|
||||
char devname[DEV_NAMELEN];
|
||||
int ret;
|
||||
|
||||
/* Set aside a transfer buffer for exclusive use by the keyboard class driver */
|
||||
/* Set aside a transfer buffer for exclusive
|
||||
* use by the keyboard class driver
|
||||
*/
|
||||
|
||||
ret = usbhost_tdalloc(priv);
|
||||
if (ret < 0)
|
||||
@@ -1731,7 +1741,9 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv)
|
||||
(FAR char * const *)NULL);
|
||||
if (priv->pollpid < 0)
|
||||
{
|
||||
/* Failed to started the poll thread... probably due to memory resources */
|
||||
/* Failed to started the poll thread...
|
||||
* probably due to memory resources
|
||||
*/
|
||||
|
||||
usbhost_givesem(&g_exclsem);
|
||||
ret = (int)priv->pollpid;
|
||||
|
||||
@@ -237,7 +237,9 @@ struct usbhost_state_s
|
||||
|
||||
struct usbhost_class_s usbclass;
|
||||
|
||||
/* This is an instance of the USB host driver bound to this class instance */
|
||||
/* This is an instance of the USB host driver
|
||||
* bound to this class instance
|
||||
*/
|
||||
|
||||
struct usbhost_driver_s *drvr;
|
||||
|
||||
@@ -1173,7 +1175,9 @@ static int usbhost_mouse_poll(int argc, char *argv[])
|
||||
|
||||
priv->sample.valid = true;
|
||||
|
||||
/* Indicate the availability of new sample data for this ID */
|
||||
/* Indicate the availability of new sample data
|
||||
* for this ID
|
||||
*/
|
||||
|
||||
priv->sample.id = priv->id;
|
||||
#else
|
||||
@@ -1498,7 +1502,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv,
|
||||
uinfo("Interface descriptor\n");
|
||||
DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC);
|
||||
|
||||
/* Did we already find what we needed from a preceding interface? */
|
||||
/* Did we already find what we needed from
|
||||
* a preceding interface?
|
||||
*/
|
||||
|
||||
if ((found & USBHOST_ALLFOUND) == USBHOST_ALLFOUND)
|
||||
{
|
||||
@@ -1588,7 +1594,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv,
|
||||
|
||||
if (found == USBHOST_ALLFOUND)
|
||||
{
|
||||
/* Yes.. then break out of the loop and use the preceding interface */
|
||||
/* Yes.. then break out of the loop
|
||||
* and use the preceding interface
|
||||
*/
|
||||
|
||||
done = true;
|
||||
}
|
||||
@@ -1646,7 +1654,9 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv)
|
||||
char devname[DEV_NAMELEN];
|
||||
int ret;
|
||||
|
||||
/* Set aside a transfer buffer for exclusive use by the mouse class driver */
|
||||
/* Set aside a transfer buffer for exclusive
|
||||
* use by the mouse class driver
|
||||
*/
|
||||
|
||||
ret = usbhost_tdalloc(priv);
|
||||
if (ret < 0)
|
||||
@@ -1696,7 +1706,9 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv)
|
||||
(FAR char * const *)NULL);
|
||||
if (priv->pollpid < 0)
|
||||
{
|
||||
/* Failed to started the poll thread... probably due to memory resources */
|
||||
/* Failed to started the poll thread...
|
||||
* probably due to memory resources
|
||||
*/
|
||||
|
||||
usbhost_givesem(&g_exclsem);
|
||||
ret = priv->pollpid;
|
||||
|
||||
@@ -1241,7 +1241,9 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv)
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Set aside a transfer buffer for exclusive use by the mass storage driver */
|
||||
/* Set aside a transfer buffer for exclusive
|
||||
* use by the mass storage driver
|
||||
*/
|
||||
|
||||
ret = usbhost_talloc(priv);
|
||||
if (ret < 0)
|
||||
@@ -1729,7 +1731,9 @@ static FAR struct usbhost_class_s *
|
||||
|
||||
priv->crefs = 1;
|
||||
|
||||
/* Initialize semaphores (this works okay in the interrupt context) */
|
||||
/* Initialize semaphores
|
||||
* (this works okay in the interrupt context)
|
||||
*/
|
||||
|
||||
nxsem_init(&priv->exclsem, 0, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user