Fix nxstyle warning

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-10-19 12:30:19 +08:00 committed by Brennan Ashton
parent eb4121ce38
commit 2956b8516b
9 changed files with 109 additions and 111 deletions
arch/arm
include/lpc43xx
src
boards/arm/kinetis/freedom-k66f/include
include/nuttx
net/utils

View File

@ -47,6 +47,7 @@
************************************************************************************/
/* Per the data sheet: LPC4350/30/20/10 Rev. 3.2 — 4 June 2012 */
/* Get customizations for each supported chip.
*
* SRAM Resources
@ -75,6 +76,7 @@
*/
/* Per the user manual: UM10503, Rev. 1.2 — 8 June 2012 */
/* Get customizations for each supported chip.
*
* SRAM Resources
@ -688,6 +690,7 @@
#endif
/* NVIC priority levels *************************************************************/
/* Each priority field holds a priority value, 0-31. The lower the value, the greater
* the priority of the corresponding interrupt.
*
@ -713,16 +716,4 @@
#define NVIC_SYSH_PRIORITY_MAX LPC43M4_SYSH_PRIORITY_MAX
#define NVIC_SYSH_PRIORITY_STEP LPC43M4_SYSH_PRIORITY_STEP
/************************************************************************************
* Public Types
************************************************************************************/
/************************************************************************************
* Public Data
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
#endif /* __ARCH_ARM_INCLUDE_LPC43XX_CHIP_H */

View File

@ -148,7 +148,9 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
if ((getreg32(SAM_TRNG_ISR) & TRNG_INT_DATRDY) == 0)
{
/* No? Then return and continue processing on the next interrupt. */
/* No? Then return and continue processing on the next
* interrupt.
*/
return OK;
}
@ -156,10 +158,10 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
/* As required by the FIPS PUB (Federal Information Processing Standard
* Publication) 140-2, the first random number generated after setting
* the RNGEN bit should not be used, but saved for comparison with the
* next generated random number. Each subsequent generated random number
* has to be compared with the previously generated number. The test
* fails if any two compared numbers are equal (continuous random number
* generator test).
* next generated random number. Each subsequent generated random
* number has to be compared with the previously generated number. The
* test fails if any two compared numbers are equal (continuous random
* number generator test).
*/
if (g_trngdev.nsamples == 0)
@ -179,7 +181,9 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
else if (odata == g_trngdev.samples[g_trngdev.nsamples - 1])
{
/* Two samples with the same value. Discard this one and try again. */
/* Two samples with the same value. Discard this one and try
* again.
*/
continue;
}

View File

@ -149,7 +149,9 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
if ((getreg32(SAM_TRNG_ISR) & TRNG_INT_DATRDY) == 0)
{
/* No? Then return and continue processing on the next interrupt. */
/* No? Then return and continue processing on the next
* interrupt.
*/
return OK;
}
@ -157,10 +159,10 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
/* As required by the FIPS PUB (Federal Information Processing Standard
* Publication) 140-2, the first random number generated after setting
* the RNGEN bit should not be used, but saved for comparison with the
* next generated random number. Each subsequent generated random number
* has to be compared with the previously generated number. The test
* fails if any two compared numbers are equal (continuous random number
* generator test).
* next generated random number. Each subsequent generated random
* number has to be compared with the previously generated number. The
* test fails if any two compared numbers are equal (continuous random
* number generator test).
*/
if (g_trngdev.nsamples == 0)
@ -180,7 +182,9 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
else if (odata == g_trngdev.samples[g_trngdev.nsamples - 1])
{
/* Two samples with the same value. Discard this one and try again. */
/* Two samples with the same value. Discard this one and try
* again.
*/
continue;
}

View File

@ -276,7 +276,7 @@
* low-power wake up signal. Also, only SW3 can be a non-maskable interrupt.
*
* Switch GPIO Function
* --------- ---------------------------------------------------------------
* ------ ---------------------------------------------------------------
* SW2 PTC6/SPI0_SOUT/PD0_EXTRG/I2S0_RX_BCLK/FB_AD9/I2S0_MCLK/LLWU_P10
* SW3 PTA4/FTM0_CH1/NMI_b/LLWU_P3
*/
@ -382,11 +382,10 @@
#define PIN_SPI1_SIN PIN_SPI1_SIN_3
/* Ethernet MAC/KSZ8081 PHY
* ------------------------
* ------------ ----------------- --------------------------------------------
* KSZ8081 Board Signal(s) K66F Pin
* Pin Signal Function pinmux Name
* --- -------- ----------------- --------------------------------------------
* ------------ ----------- ---------------------------------------
* KSZ8081 Board K66F Pin
* Pin Signal Signal(s) Function pinmux Name
* --- -------- ------------ ---------------------------------------
* 1 VDD_1V2 VDDPLL_1.2V --- ---
* 2 VDDA_3V3 VDDA_ENET --- ---
* 3 RXM ENET1_RX- --- ---
@ -395,7 +394,7 @@
* 6 TXP ENET1_TX+ --- ---
* 7 X0 RMII_XTAL0 --- ---
* 8 XI RMII_XTAL1 --- ---
* 9 REXT --- ---, Apparently not connected ---
* 9 REXT --- Apparently not connected ---
* 10 MDIO RMII0_MDIO PTB0/RMII0_MDIO PIN_RMII0_MDIO
* 11 MDC RMII0_MDC PTB1/RMII0_MDC PIN_RMII0_MDC
* 12 RXD1 RMII0_RXD_1 PTA12/RMII0_RXD1 PIN_RMII0_RXD1
@ -405,15 +404,14 @@
* 16 REF_CLK PTE26 PTE26(Ethernet clock) PTE26/ENET_1588_CLKIN
* 17 RXER RMII0_RXER PTA5/RMII0_RXER PIN_RMII0_RXER
* 18 INTRP RMII0_INT_B, J14 Pin 2, Apparently not ---
* PHY_INT_1 available unless jumpered
* PHY_INT_1 available unless jumpered ---
* 19 TXEN RMII0_TXEN PTA15/RMII0_TXEN PIN_RMII0_TXEN
* 20 TXD0 RMII0_TXD_0 PTA16/RMII0_TXD0 PIN_RMII0_TXD0
* 21 TXD1 RMII0_TXD_1 PTA17/RMII0_TXD1 PIN_RMII0_TXD1
* 22 GND1 --- --- ---
* 24 nRST PHY_RST_B --- ---
* 25 GND2 --- --- ---
* --- -------- ----------------- --------------------------------------------
*
* --- -------- ------------ --------------------------------------------
*/
#define PIN_RMII0_MDIO PIN_RMII0_MDIO_1

View File

@ -1,4 +1,4 @@
/******************************************************************************
/****************************************************************************
* include/nuttx/sensors/adxl372.h
*
* Copyright (C) 2017-2018 RAF Research LLC. All rights reserved.
@ -31,17 +31,17 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_ADXL372_H
#define __INCLUDE_NUTTX_SENSORS_ADXL372_H
/******************************************************************************
/****************************************************************************
* Driver usage notes:
*
* This driver is a "kernel sensor leaf driver" that may be used directly from
* user applications via the file_operations interface or have selected entry
* points called directly from a "kernel sensor cluster driver".
* This driver is a "kernel sensor leaf driver" that may be used directly
* from user applications via the file_operations interface or have selected
* entry points called directly from a "kernel sensor cluster driver".
*
* To use this driver via the file_operations interface, the board
* initialization function should call this driver's registration function.
@ -85,10 +85,9 @@
*
****************************************************************************/
/*******************************************************************************
/****************************************************************************
* Included Files
*******************************************************************************
*/
****************************************************************************/
#include <nuttx/irq.h>
#include <nuttx/config.h>
@ -99,10 +98,9 @@
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_ADXL372) \
&& defined(CONFIG_SPI_EXCHANGE)
/*******************************************************************************
/****************************************************************************
* Pre-processor Definitions
*******************************************************************************
*/
****************************************************************************/
/* ADXL372 common definitions */
@ -196,10 +194,10 @@ struct adxl372_dvr_entry_vector_s
{
struct sensor_cluster_operations_s c;
/* Extend the sensor cluster driver interface with a SPI DMA exchange transfer.
* The standard driver_read and driver_write perform PIO transfers.
* The will loop waiting on the SPI hardware and are only appropriate for
* short data transfers.
/* Extend the sensor cluster driver interface with a SPI DMA exchange
* transfer. The standard driver_read and driver_write perform PIO
* transfers. The will loop waiting on the SPI hardware and are only
* appropriate for short data transfers.
* Note that the first byte in the tx buffer must be a command/address
* byte. The exchange function does not provide one. Also note that
* the first byte stored in the rxbuffer is a garbage byte, which

View File

@ -1,4 +1,4 @@
/*****************************************************************************
/****************************************************************************
* include/nuttx/sensors/lsm330.h
*
* Copyright (C) 2017-2018 RAF Research LLC. All rights reserved.
@ -31,12 +31,12 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_SENSORS_LSM330_H
#define __INCLUDE_NUTTX_SENSORS_LSM330_H
/*****************************************************************************
/****************************************************************************
* Driver usage notes:
*
* This driver is a "kernel sensor leaf driver" that may be used directly
@ -320,15 +320,15 @@ extern "C"
#define EXTERN extern
#endif
/*******************************************************************************
/****************************************************************************
* Name: lsm330_register
*
* Description:
* Register the LSM330 character device as 'devpath'
*
* Input Parameters:
* devpath_acl - The full path to the driver to register. E.g., "/dev/acl0"
* devpath_gyro - The full path to the driver to register. E.g., "/dev/gyr0"
* devpath_acl - The full path to the driver to register. E.g. "/dev/acl0"
* devpath_gyro - The full path to the driver to register. E.g. "/dev/gyr0"
* spi - An instance of the SPI interface to use to communicate with LSM330
* config_acl - configuration for the LSM330 accelerometer driver.
* For details see description above.
@ -338,8 +338,7 @@ extern "C"
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
*******************************************************************************
*/
****************************************************************************/
int lsm330_register(FAR const char *devpath_acl,
FAR const char *devpath_gyro,

View File

@ -127,7 +127,8 @@ extern "C"
*
****************************************************************************/
int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen);
int ramlog_register(FAR const char *devpath,
FAR char *buffer, size_t buflen);
/****************************************************************************
* Name: ramlog_syslog_register

View File

@ -64,7 +64,8 @@
* unnested) that can be processed in the report item descriptor. A large
* value allows for more COLLECTION items to be processed, but consumes
* more memory. By default this is set to 10 collections, but this can be
* overridden by defining CONFIG_HID_MAXCOLLECTIONS in the NuttX config file.
* overridden by defining CONFIG_HID_MAXCOLLECTIONS in the NuttX config
* file.
*
* CONFIG_HID_MAXITEMS
* Constant indicating the maximum number of report items (IN, OUT or
@ -80,8 +81,9 @@
* array in the user HID Report Info structure. A large value allows for
* more report ID report sizes to be stored, but consumes more memory. By
* default this is set to 10 items, but this can be overridden by defining
* CONFIG_HID_MAXIDS in the NuttX config file. Note that IN, OUT and FEATURE
* items sharing the same report ID consume only one size item in the array.
* CONFIG_HID_MAXIDS in the NuttX config file. Note that IN, OUT and
* FEATURE items sharing the same report ID consume only one size item in
* the array.
*/
#ifndef CONFIG_HID_STATEDEPTH
@ -201,7 +203,9 @@ struct hid_rptsizeinfo_s
struct hid_rptinfo_s
{
/* nitems is the number of report items stored in the report items array (rptitems[]). */
/* nitems is the number of report items stored in the report items array
* (rptitems[]).
*/
uint8_t nitems;
struct hid_rptitem_s items[CONFIG_HID_MAXITEMS];
@ -349,5 +353,4 @@ size_t hid_reportsize(FAR struct hid_rptinfo_s *rptinfo, uint8_t id,
}
#endif
#endif /* __INCLUDE_NUTTX_USB_HID_PARSER_H */

View File

@ -224,7 +224,7 @@ void net_ipv6_pref2mask(uint8_t preflen, net_ipv6addr_t mask);
* data and len.
*
* Input Parameters:
* sum - Partial calculations carried over from a previous call to chksum().
* sum - Partial calculations carried over from a previous call to chksum.
* This should be zero on the first time that check sum is called.
* data - Beginning of the data to include in the checksum.
* len - Length of the data to include in the checksum.
@ -254,7 +254,7 @@ uint16_t chksum(uint16_t sum, FAR const uint8_t *data, uint16_t len);
*
* buf - A pointer to the buffer over which the checksum is to be computed.
*
* len - The length of the buffer over which the checksum is to be computed.
* len - Length of the buffer over which the checksum is to be computed.
*
* Returned Value:
* The Internet checksum of the buffer.