Skip to content

Commit

Permalink
CI check: fix nxstyle warning
Browse files Browse the repository at this point in the history
nxstyle fixes to reduce the CI warnings

Signed-off-by: chao.an <anchao@xiaomi.com>
  • Loading branch information
anchao authored and xiaoxiang781216 committed Jul 2, 2020
1 parent 3fbdc21 commit d938e2c
Show file tree
Hide file tree
Showing 36 changed files with 716 additions and 545 deletions.
4 changes: 2 additions & 2 deletions boards/arm/imxrt/imxrt1020-evk/src/imxrt_usbhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ void imxrt_usbhost_vbusdrive(int rhport, bool enable)
}
}

/****************************************************************************
/*****************************************************************************
* Name: imxrt_setup_overcurrent
*
* Description:
Expand All @@ -291,7 +291,7 @@ void imxrt_usbhost_vbusdrive(int rhport, bool enable)
* Zero (OK) returned on success; a negated errno value is returned on
* failure.
*
****************************************************************************/
*****************************************************************************/

#if 0 /* Not ready yet */
int imxrt_setup_overcurrent(xcpt_t handler, void *arg)
Expand Down
4 changes: 2 additions & 2 deletions boards/arm/imxrt/imxrt1060-evk/src/imxrt_usbhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void imxrt_usbhost_vbusdrive(int rhport, bool enable)
}
}

/****************************************************************************
/*****************************************************************************
* Name: imxrt_setup_overcurrent
*
* Description:
Expand All @@ -289,7 +289,7 @@ void imxrt_usbhost_vbusdrive(int rhport, bool enable)
* Zero (OK) returned on success; a negated errno value is returned on
* failure.
*
****************************************************************************/
*****************************************************************************/

#if 0 /* Not ready yet */
int imxrt_setup_overcurrent(xcpt_t handler, void *arg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ static int nsh_usbhostinitialize(void)
if (ret != OK)
{
syslog(LOG_ERR,
"ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
"ERROR: Failed to register the CDC/ACM serial class: %d\n",
ret);
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ static int nsh_usbhostinitialize(void)
if (ret != OK)
{
syslog(LOG_ERR,
"ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
"ERROR: Failed to register the CDC/ACM serial class: %d\n",
ret);
}
#endif

Expand Down
3 changes: 2 additions & 1 deletion boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_bringup.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ static int nsh_usbhostinitialize(void)
if (ret != OK)
{
syslog(LOG_ERR,
"ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
"ERROR: Failed to register the CDC/ACM serial class: %d\n",
ret);
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ static int nsh_usbhostinitialize(void)
if (ret < 0)
{
syslog(LOG_ERR,
"ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
"ERROR: Failed to register the CDC/ACM serial class: %d\n",
ret);
}
#endif

Expand Down
3 changes: 2 additions & 1 deletion boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_bringup.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ static int nsh_usbhostinitialize(void)
if (ret != OK)
{
syslog(LOG_ERR,
"ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
"ERROR: Failed to register the CDC/ACM serial class: %d\n",
ret);
}
#endif

Expand Down
4 changes: 2 additions & 2 deletions boards/arm/sama5/sama5d3-xplained/src/sam_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ static int ehci_waiter(int argc, char *argv[])
* USB Ports
* The SAMA5D3 series-MB features three USB communication ports:
*
* 1. Port A Host High Speed (EHCI) and Full Speed (OHCI) multiplexed with
* USB Device High Speed Micro AB connector, J20
* 1. Port A Host High Speed (EHCI) and Full Speed (OHCI) multiplexed
* with USB Device High Speed Micro AB connector, J20
*
* 2. Port B Host High Speed (EHCI) and Full Speed (OHCI) standard type A
* connector, J19 upper port
Expand Down
1 change: 1 addition & 0 deletions boards/arm/stm32/axoloti/src/stm32_usbhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ int stm32_usbhost_initialize(void)
/* First, register all of the class drivers needed to support the drivers
* that we care about:
*/

uinfo("Register class drivers\n");

#ifdef CONFIG_USBHOST_MSC
Expand Down
58 changes: 33 additions & 25 deletions boards/arm/stm32/cloudctrl/src/stm32_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static int usbhost_waiter(int argc, char *argv[])
struct usbhost_hubport_s *hport;

uinfo("Running\n");
for (;;)
for (; ; )
{
/* Wait for the device to change state */

Expand Down Expand Up @@ -140,16 +140,20 @@ static int usbhost_waiter(int argc, char *argv[])
* Name: stm32_usbinitialize
*
* Description:
* Called from stm32_usbinitialize very early in inialization to setup USB-related
* GPIO pins for the STM3240G-EVAL board.
* Called from stm32_usbinitialize very early in inialization to setup
* USB-related GPIO pins for the STM3240G-EVAL board.
*
****************************************************************************/

void stm32_usbinitialize(void)
{
/* The OTG FS has an internal soft pull-up. No GPIO configuration is required */
/* The OTG FS has an internal soft pull-up.
* No GPIO configuration is required
*/

/* Configure the OTG FS VBUS sensing GPIO, Power On, and Overcurrent GPIOs */
/* Configure the OTG FS VBUS sensing GPIO,
* Power On, and Overcurrent GPIOs
*/

#ifdef CONFIG_STM32_OTGFS
stm32_configgpio(GPIO_OTGFS_VBUS);
Expand All @@ -162,7 +166,8 @@ void stm32_usbinitialize(void)
* Name: stm32_usbhost_initialize
*
* Description:
* Called at application startup time to initialize the USB host functionality.
* Called at application startup time to initialize the USB host
* functionality.
* This function will start a thread that will monitor for device
* connection/disconnection events.
*
Expand Down Expand Up @@ -224,21 +229,24 @@ int stm32_usbhost_initialize(void)
* Name: stm32_usbhost_vbusdrive
*
* Description:
* Enable/disable driving of VBUS 5V output. This function must be provided be
* each platform that implements the STM32 OTG FS host interface
* Enable/disable driving of VBUS 5V output. This function must be
* provided be each platform that implements the STM32 OTG FS host
* interface
*
* "On-chip 5 V VBUS generation is not supported. For this reason, a charge pump
* or, if 5 V are available on the application board, a basic power switch, must
* be added externally to drive the 5 V VBUS line. The external charge pump can
* be driven by any GPIO output. When the application decides to power on VBUS
* using the chosen GPIO, it must also set the port power bit in the host port
* control and status register (PPWR bit in OTG_FS_HPRT).
* "On-chip 5 V VBUS generation is not supported. For this reason, a
* charge pump or, if 5 V are available on the application board, a
* basic power switch, must be added externally to drive the 5 V VBUS
* line. The external charge pump can be driven by any GPIO output.
* When the application decides to power on VBUS using the chosen GPIO,
* it must also set the port power bit in the host port control and
* status register (PPWR bit in OTG_FS_HPRT).
*
* "The application uses this field to control power to this port, and the core
* clears this bit on an overcurrent condition."
* "The application uses this field to control power to this port,
* and the core clears this bit on an overcurrent condition."
*
* Input Parameters:
* iface - For future growth to handle multiple USB host interface. Should be zero.
* iface - For future growth to handle multiple USB host interface.
* Should be zero.
* enable - true: enable VBUS power; false: disable VBUS power
*
* Returned Value:
Expand Down Expand Up @@ -270,16 +278,16 @@ void stm32_usbhost_vbusdrive(int iface, bool enable)
* Name: stm32_setup_overcurrent
*
* Description:
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
* Setup to receive an interrupt-level callback if an overcurrent
* condition is detected.
*
* Input Parameters:
* handler - New overcurrent interrupt handler
* arg - The argument provided for the interrupt handler
*
* Returned Value:
* Zero (OK) is returned on success. Otherwise, a negated errno value is returned
* to indicate the nature of the failure.
* Zero (OK) is returned on success. Otherwise, a negated errno value
* is returned to indicate the nature of the failure.
*
****************************************************************************/

Expand All @@ -294,10 +302,10 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg)
* Name: stm32_usbsuspend
*
* Description:
* Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is
* used. This function is called whenever the USB enters or leaves suspend mode.
* This is an opportunity for the board logic to shutdown clocks, power, etc.
* while the USB is suspended.
* Board logic must provide the stm32_usbsuspend logic if the USBDEV
* driver is used. This function is called whenever the USB enters or
* leaves suspend mode. This is an opportunity for the board logic to
* shutdown clocks, power, etc. while the USB is suspended.
*
****************************************************************************/

Expand Down
60 changes: 34 additions & 26 deletions boards/arm/stm32/mikroe-stm32f4/src/stm32_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int usbhost_waiter(int argc, char *argv[])
struct usbhost_hubport_s *hport;

uinfo("Running\n");
for (;;)
for (; ; )
{
/* Wait for the device to change state */

Expand Down Expand Up @@ -139,16 +139,20 @@ static int usbhost_waiter(int argc, char *argv[])
* Name: stm32_usbinitialize
*
* Description:
* Called from stm32_usbinitialize very early in inialization to setup USB-related
* GPIO pins for the STM32F4Discovery board.
* Called from stm32_usbinitialize very early in inialization to setup
* USB-related GPIO pins for the STM32F4Discovery board.
*
****************************************************************************/

void stm32_usbinitialize(void)
{
/* The OTG FS has an internal soft pull-up. No GPIO configuration is required */
/* The OTG FS has an internal soft pull-up.
* No GPIO configuration is required
*/

/* Configure the OTG FS VBUS sensing GPIO, Power On, and Overcurrent GPIOs */
/* Configure the OTG FS VBUS sensing GPIO,
* Power On, and Overcurrent GPIOs
*/

#ifdef CONFIG_STM32_OTGFS
stm32_configgpio(GPIO_OTGFS_VBUS);
Expand All @@ -161,7 +165,8 @@ void stm32_usbinitialize(void)
* Name: stm32_usbhost_initialize
*
* Description:
* Called at application startup time to initialize the USB host functionality.
* Called at application startup time to initialize the USB host
* functionality.
* This function will start a thread that will monitor for device
* connection/disconnection events.
*
Expand Down Expand Up @@ -223,21 +228,24 @@ int stm32_usbhost_initialize(void)
* Name: stm32_usbhost_vbusdrive
*
* Description:
* Enable/disable driving of VBUS 5V output. This function must be provided be
* each platform that implements the STM32 OTG FS host interface
* Enable/disable driving of VBUS 5V output. This function must be
* provided be each platform that implements the STM32 OTG FS host
* interface
*
* "On-chip 5 V VBUS generation is not supported. For this reason, a charge pump
* or, if 5 V are available on the application board, a basic power switch, must
* be added externally to drive the 5 V VBUS line. The external charge pump can
* be driven by any GPIO output. When the application decides to power on VBUS
* using the chosen GPIO, it must also set the port power bit in the host port
* control and status register (PPWR bit in OTG_FS_HPRT).
* "On-chip 5 V VBUS generation is not supported. For this reason, a
* charge pump or, if 5 V are available on the application board, a
* basic power switch, must be added externally to drive the 5 V VBUS
* line. The external charge pump can be driven by any GPIO output.
* When the application decides to power on VBUS using the chosen GPIO,
* it must also set the port power bit in the host port control and
* status register (PPWR bit in OTG_FS_HPRT).
*
* "The application uses this field to control power to this port, and the core
* clears this bit on an overcurrent condition."
* "The application uses this field to control power to this port,
* and the core clears this bit on an overcurrent condition."
*
* Input Parameters:
* iface - For future growth to handle multiple USB host interface. Should be zero.
* iface - For future growth to handle multiple USB host interface.
* Should be zero.
* enable - true: enable VBUS power; false: disable VBUS power
*
* Returned Value:
Expand Down Expand Up @@ -269,16 +277,16 @@ void stm32_usbhost_vbusdrive(int iface, bool enable)
* Name: stm32_setup_overcurrent
*
* Description:
* Setup to receive an interrupt-level callback if an overcurrent condition is
* detected.
* Setup to receive an interrupt-level callback if an overcurrent
* condition is detected.
*
* Input Parameters:
* handler - New overcurrent interrupt handler
* arg - The argument provided for the interrupt handler
*
* Returned Value:
* Zero (OK) is returned on success. Otherwise, a negated errno value is returned
* to indicate the nature of the failure.
* Zero (OK) is returned on success. Otherwise, a negated errno value
* is returned to indicate the nature of the failure.
*
****************************************************************************/

Expand All @@ -290,13 +298,13 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg)
#endif

/****************************************************************************
* Name: stm32_usbsuspend
* Name: stm32_usbsuspend
*
* Description:
* Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is
* used. This function is called whenever the USB enters or leaves suspend mode.
* This is an opportunity for the board logic to shutdown clocks, power, etc.
* while the USB is suspended.
* Board logic must provide the stm32_usbsuspend logic if the USBDEV
* driver is used. This function is called whenever the USB enters or
* leaves suspend mode. This is an opportunity for the board logic to
* shutdown clocks, power, etc. while the USB is suspended.
*
****************************************************************************/

Expand Down
Loading

0 comments on commit d938e2c

Please sign in to comment.