mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
Fix some spacing problems
This commit is contained in:
+1
-1
Submodule arch updated: 0c8200c21f...cc863e71f9
@@ -142,7 +142,7 @@ EXEPATH_HANDLE exepath_init(void)
|
|||||||
return (EXEPATH_HANDLE)exepath;
|
return (EXEPATH_HANDLE)exepath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: exepath_next
|
* Name: exepath_next
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
|
|||||||
@@ -129,13 +129,13 @@ symtab_findorderedbyname(FAR const struct symtab_s *symtab,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* low == high... One final check. We might not have actually tested
|
/* low == high... One final check. We might not have actually tested
|
||||||
* the final symtab[] name.
|
* the final symtab[] name.
|
||||||
*
|
*
|
||||||
* Example: Only the last pass through loop, suppose low = 1, high = 2,
|
* Example: Only the last pass through loop, suppose low = 1, high = 2,
|
||||||
* mid = 1, and symtab[high].sym_name == name. Then we would get here with
|
* mid = 1, and symtab[high].sym_name == name. Then we would get here with
|
||||||
* low = 2, high = 2, but symtab[2].sym_name was never tested.
|
* low = 2, high = 2, but symtab[2].sym_name was never tested.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return strcmp(name, symtab[low].sym_name) == 0 ? &symtab[low] : NULL;
|
return strcmp(name, symtab[low].sym_name) == 0 ? &symtab[low] : NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,13 +114,13 @@ symtab_findorderedbyvalue(FAR const struct symtab_s *symtab,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* low == high... One final check. We might not have actually tested
|
/* low == high... One final check. We might not have actually tested
|
||||||
* the final symtab[] name.
|
* the final symtab[] name.
|
||||||
*
|
*
|
||||||
* Example: Only the last pass through loop, suppose low = 1, high = 2,
|
* Example: Only the last pass through loop, suppose low = 1, high = 2,
|
||||||
* mid = 1, and symtab[high].sym_name == name. Then we would get here with
|
* mid = 1, and symtab[high].sym_name == name. Then we would get here with
|
||||||
* low = 2, high = 2, but symtab[2].sym_name was never tested.
|
* low = 2, high = 2, but symtab[2].sym_name was never tested.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return value == symtab[low].sym_value ? &symtab[low] : NULL;
|
return value == symtab[low].sym_value ? &symtab[low] : NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
Submodule configs updated: 87c0e8d612...dbc09272e2
@@ -426,14 +426,14 @@ static ssize_t dac_write(FAR struct file *filep, FAR const char *buffer, size_t
|
|||||||
nsent += msglen;
|
nsent += msglen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We get here after all messages have been added to the FIFO. Check if
|
/* We get here after all messages have been added to the FIFO. Check if
|
||||||
* we need to kick of the XMIT sequence.
|
* we need to kick of the XMIT sequence.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (empty)
|
if (empty)
|
||||||
{
|
{
|
||||||
dac_xmit(dev);
|
dac_xmit(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the number of bytes that were sent */
|
/* Return the number of bytes that were sent */
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -698,14 +698,14 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
nsent += msglen;
|
nsent += msglen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We get here after all messages have been added to the FIFO. Check if
|
/* We get here after all messages have been added to the FIFO. Check if
|
||||||
* we need to kick of the XMIT sequence.
|
* we need to kick of the XMIT sequence.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (inactive)
|
if (inactive)
|
||||||
{
|
{
|
||||||
can_xmit(dev);
|
can_xmit(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the number of bytes that were sent */
|
/* Return the number of bytes that were sent */
|
||||||
|
|
||||||
|
|||||||
@@ -937,7 +937,7 @@ static inline int mio283qt2_hwinitialize(FAR struct mio283qt2_dev_s *priv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************************
|
/**************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -833,7 +833,7 @@ static inline int mio283qt9a_hwinitialize(FAR struct mio283qt9a_dev_s *priv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************************
|
/**************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ static const uint8_t g_sleepon[] =
|
|||||||
static const uint8_t g_horzinc[] =
|
static const uint8_t g_horzinc[] =
|
||||||
{
|
{
|
||||||
SSD1329_GDDRAM_REMAP,
|
SSD1329_GDDRAM_REMAP,
|
||||||
(SSD1329_COM_SPLIT|SSD1329_COM_REMAP|SSD1329_NIBBLE_REMAP),
|
(SSD1329_COM_SPLIT|SSD1329_COM_REMAP|SSD1329_NIBBLE_REMAP),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The following set a window that covers the entire display */
|
/* The following set a window that covers the entire display */
|
||||||
|
|||||||
@@ -1079,7 +1079,7 @@ static inline int ra8875_hwinitialize(FAR struct ra8875_dev_s *priv)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************************
|
/**************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -1284,7 +1284,7 @@ static inline int ssd1289_hwinitialize(FAR struct ssd1289_dev_s *priv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************************
|
/**************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -232,10 +232,10 @@ struct st7567_dev_s
|
|||||||
uint8_t contrast;
|
uint8_t contrast;
|
||||||
uint8_t powered;
|
uint8_t powered;
|
||||||
|
|
||||||
/* The ST7567 does not support reading from the display memory in SPI mode.
|
/* The ST7567 does not support reading from the display memory in SPI mode.
|
||||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||||
* a shadow copy of the framebuffer memory.
|
* a shadow copy of the framebuffer memory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8_t fb[ST7567_FBSIZE];
|
uint8_t fb[ST7567_FBSIZE];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -287,10 +287,10 @@ struct ug2864ambag01_dev_s
|
|||||||
bool on; /* true: display is on */
|
bool on; /* true: display is on */
|
||||||
|
|
||||||
|
|
||||||
/* The SH1101A does not support reading from the display memory in SPI mode.
|
/* The SH1101A does not support reading from the display memory in SPI mode.
|
||||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||||
* a shadow copy of the framebuffer memory. At 128x64, this amounts to 1KB.
|
* a shadow copy of the framebuffer memory. At 128x64, this amounts to 1KB.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8_t fb[UG2864AMBAG01_FBSIZE];
|
uint8_t fb[UG2864AMBAG01_FBSIZE];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -247,10 +247,10 @@ struct ug_dev_s
|
|||||||
uint8_t contrast;
|
uint8_t contrast;
|
||||||
uint8_t powered;
|
uint8_t powered;
|
||||||
|
|
||||||
/* The SSD1305 does not support reading from the display memory in SPI mode.
|
/* The SSD1305 does not support reading from the display memory in SPI mode.
|
||||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||||
* a shadow copy of the framebuffer memory.
|
* a shadow copy of the framebuffer memory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8_t fb[UG_FBSIZE];
|
uint8_t fb[UG_FBSIZE];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -640,7 +640,7 @@ static ssize_t at45db_bread(FAR struct mtd_dev_s *mtd, off_t startblock,
|
|||||||
FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd;
|
FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd;
|
||||||
ssize_t nbytes;
|
ssize_t nbytes;
|
||||||
|
|
||||||
/* On this device, we can handle the block read just like the byte-oriented read */
|
/* On this device, we can handle the block read just like the byte-oriented read */
|
||||||
|
|
||||||
nbytes = at45db_read(mtd, startblock << priv->pageshift,
|
nbytes = at45db_read(mtd, startblock << priv->pageshift,
|
||||||
nblocks << priv->pageshift, buffer);
|
nblocks << priv->pageshift, buffer);
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ static int nand_writepage(FAR struct nand_dev_s *nand, off_t block,
|
|||||||
* ECC calculations.
|
* ECC calculations.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
return NAND_WRITEPAGE(nand->raw, block, page, data, NULL);
|
return NAND_WRITEPAGE(nand->raw, block, page, data, NULL);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
#define EBICSA_EBI_DBPDC (1 << 9)
|
#define EBICSA_EBI_DBPDC (1 << 9)
|
||||||
#define EBICSA_NAND_D0_ON_D16 (1 << 24)
|
#define EBICSA_NAND_D0_ON_D16 (1 << 24)
|
||||||
|
|
||||||
/* Misc. definitions */
|
/* Misc. definitions */
|
||||||
|
|
||||||
#define MAX_READ_STATUS_COUNT 100000 /* Read status timeout */
|
#define MAX_READ_STATUS_COUNT 100000 /* Read status timeout */
|
||||||
#define ONFI_PARAM_TABLE_SIZE 116 /* Not all 256 bytes are useful */
|
#define ONFI_PARAM_TABLE_SIZE 116 /* Not all 256 bytes are useful */
|
||||||
|
|||||||
@@ -644,9 +644,9 @@ static inline int st25fl1_readid(struct st25fl1_dev_s *priv)
|
|||||||
default:
|
default:
|
||||||
fdbg("ERROR: Unsupported memory capacity: %02x\n", priv->cmdbuf[2]);
|
fdbg("ERROR: Unsupported memory capacity: %02x\n", priv->cmdbuf[2]);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
|
|||||||
@@ -1257,16 +1257,16 @@ static int dm9x_interrupt(int irq, FAR void *context)
|
|||||||
ndbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
|
ndbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we received an incoming packet */
|
/* Check if we received an incoming packet */
|
||||||
|
|
||||||
if (isr & DM9X_INT_PR)
|
if (isr & DM9X_INT_PR)
|
||||||
{
|
{
|
||||||
dm9x_receive(dm9x);
|
dm9x_receive(dm9x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we are able to transmit a packet */
|
/* Check if we are able to transmit a packet */
|
||||||
|
|
||||||
if (isr & DM9X_INT_PT)
|
if (isr & DM9X_INT_PT)
|
||||||
{
|
{
|
||||||
dm9x_txdone(dm9x);
|
dm9x_txdone(dm9x);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1615,7 +1615,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
|
|||||||
enc_wrbreg(priv, ENC_ERXRDPTL, (priv->nextpkt));
|
enc_wrbreg(priv, ENC_ERXRDPTL, (priv->nextpkt));
|
||||||
enc_wrbreg(priv, ENC_ERXRDPTH, (priv->nextpkt) >> 8);
|
enc_wrbreg(priv, ENC_ERXRDPTH, (priv->nextpkt) >> 8);
|
||||||
|
|
||||||
/* Decrement the packet counter indicate we are done with this packet */
|
/* Decrement the packet counter indicate we are done with this packet */
|
||||||
|
|
||||||
enc_bfsgreg(priv, ENC_ECON2, ECON2_PKTDEC);
|
enc_bfsgreg(priv, ENC_ECON2, ECON2_PKTDEC);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -561,9 +561,9 @@ int localhost_initialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NET_IPv6
|
#ifdef CONFIG_NET_IPv6
|
||||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6addr, g_lo_ipv6addr);
|
net_ipv6addr_copy(priv->lo_dev.d_ipv6addr, g_lo_ipv6addr);
|
||||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6draddr, g_lo_ipv6addr);
|
net_ipv6addr_copy(priv->lo_dev.d_ipv6draddr, g_lo_ipv6addr);
|
||||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6netmask, g_ipv6_alloneaddr);
|
net_ipv6addr_copy(priv->lo_dev.d_ipv6netmask, g_ipv6_alloneaddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Put the network in the UP state */
|
/* Put the network in the UP state */
|
||||||
|
|||||||
+3
-3
@@ -183,9 +183,9 @@ struct slip_driver_s
|
|||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* We really should get rid of CONFIG_NET_SLIP_NINTERFACES and, instead,
|
/* We really should get rid of CONFIG_NET_SLIP_NINTERFACES and, instead,
|
||||||
* kmm_malloc() new interface instances as needed.
|
* kmm_malloc() new interface instances as needed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct slip_driver_s g_slip[CONFIG_NET_SLIP_NINTERFACES];
|
static struct slip_driver_s g_slip[CONFIG_NET_SLIP_NINTERFACES];
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ static void pipecommon_pollnotify(FAR struct pipe_dev_s *dev, pollevent_t events
|
|||||||
|
|
||||||
FAR struct pipe_dev_s *pipecommon_allocdev(void)
|
FAR struct pipe_dev_s *pipecommon_allocdev(void)
|
||||||
{
|
{
|
||||||
struct pipe_dev_s *dev;
|
FAR struct pipe_dev_s *dev;
|
||||||
|
|
||||||
/* Allocate a private structure to manage the pipe */
|
/* Allocate a private structure to manage the pipe */
|
||||||
|
|
||||||
|
|||||||
@@ -792,7 +792,7 @@ static ssize_t uart_read(FAR struct file *filep, FAR char *buffer, size_t buflen
|
|||||||
nbuffered = rxbuf->size - rxbuf->tail + rxbuf->head;
|
nbuffered = rxbuf->size - rxbuf->tail + rxbuf->head;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is the level now below the watermark level that we need to report? */
|
/* Is the level now below the watermark level that we need to report? */
|
||||||
|
|
||||||
watermark = (CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK * rxbuf->size) / 100;
|
watermark = (CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK * rxbuf->size) / 100;
|
||||||
if (nbuffered <= watermark)
|
if (nbuffered <= watermark)
|
||||||
@@ -1170,7 +1170,7 @@ static int uart_close(FAR struct file *filep)
|
|||||||
|
|
||||||
uart_givesem(&dev->closesem);
|
uart_givesem(&dev->closesem);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: uart_open
|
* Name: uart_open
|
||||||
@@ -1443,6 +1443,3 @@ void uart_connected(FAR uart_dev_t *dev, bool connected)
|
|||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -708,10 +708,10 @@ static int u16550_attach(struct uart_dev_s *dev)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void u16550_detach(struct uart_dev_s *dev)
|
static void u16550_detach(FAR struct uart_dev_s *dev)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
|
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
|
||||||
struct u16550_s *priv = (struct u16550_s*)dev->priv;
|
FAR struct u16550_s *priv = (struct u16550_s*)dev->priv;
|
||||||
#ifndef CONFIG_ARCH_NOINTC
|
#ifndef CONFIG_ARCH_NOINTC
|
||||||
up_disable_irq(priv->irq);
|
up_disable_irq(priv->irq);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_SPI_BITBANG
|
#ifdef CONFIG_SPI_BITBANG
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* This file holds the static, device-independ portion of the generica SPI-
|
/* This file holds the static, device-independ portion of the generica SPI-
|
||||||
|
|||||||
@@ -426,14 +426,14 @@ static ssize_t ramlog_write(FAR struct file *filep, FAR const char *buffer, size
|
|||||||
DEBUGASSERT(inode && inode->i_private);
|
DEBUGASSERT(inode && inode->i_private);
|
||||||
priv = inode->i_private;
|
priv = inode->i_private;
|
||||||
|
|
||||||
/* Loop until all of the bytes have been written. This function may be
|
/* Loop until all of the bytes have been written. This function may be
|
||||||
* called from an interrupt handler! Semaphores cannot be used!
|
* called from an interrupt handler! Semaphores cannot be used!
|
||||||
*
|
*
|
||||||
* The write logic only needs to modify the rl_head index. Therefore,
|
* The write logic only needs to modify the rl_head index. Therefore,
|
||||||
* there is a difference in the way that rl_head and rl_tail are protected:
|
* there is a difference in the way that rl_head and rl_tail are protected:
|
||||||
* rl_tail is protected with a semaphore; rl_tail is protected by disabling
|
* rl_tail is protected with a semaphore; rl_tail is protected by disabling
|
||||||
* interrupts.
|
* interrupts.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (nwritten = 0; nwritten < len; nwritten++)
|
for (nwritten = 0; nwritten < len; nwritten++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ static int cs2100_read_reg(FAR const struct cs2100_config_s *config,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -2202,7 +2202,7 @@ static void cdcuart_txint(FAR struct uart_dev_s *dev, bool enable)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Extract references to private data */
|
/* Extract references to private data */
|
||||||
|
|
||||||
priv = (FAR struct cdcacm_dev_s*)dev->priv;
|
priv = (FAR struct cdcacm_dev_s*)dev->priv;
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ const char g_compvendorstr[] = CONFIG_COMPOSITE_VENDORSTR;
|
|||||||
const char g_compproductstr[] = CONFIG_COMPOSITE_PRODUCTSTR;
|
const char g_compproductstr[] = CONFIG_COMPOSITE_PRODUCTSTR;
|
||||||
const char g_compserialstr[] = CONFIG_COMPOSITE_SERIALSTR;
|
const char g_compserialstr[] = CONFIG_COMPOSITE_SERIALSTR;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -2218,7 +2218,7 @@ static void usbser_txint(FAR struct uart_dev_s *dev, bool enable)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Extract references to private data */
|
/* Extract references to private data */
|
||||||
|
|
||||||
priv = (FAR struct pl2303_dev_s*)dev->priv;
|
priv = (FAR struct pl2303_dev_s*)dev->priv;
|
||||||
|
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ int usbmsc_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc)
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
case USBMSC_MANUFACTURERSTRID:
|
case USBMSC_MANUFACTURERSTRID:
|
||||||
str = g_mscvendorstr;
|
str = g_mscvendorstr;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -1712,7 +1712,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val)
|
|||||||
|
|
||||||
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
||||||
{
|
{
|
||||||
/* Little endian means LS halfword first in byte stream */
|
/* Little endian means LS halfword first in byte stream */
|
||||||
|
|
||||||
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1783,7 +1783,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val)
|
|||||||
|
|
||||||
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
||||||
{
|
{
|
||||||
/* Little endian means LS halfword first in byte stream */
|
/* Little endian means LS halfword first in byte stream */
|
||||||
|
|
||||||
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -742,7 +742,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val)
|
|||||||
|
|
||||||
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
||||||
{
|
{
|
||||||
/* Little endian means LS halfword first in byte stream */
|
/* Little endian means LS halfword first in byte stream */
|
||||||
|
|
||||||
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1481,7 +1481,7 @@ static void usbhost_putbe16(uint8_t *dest, uint16_t val)
|
|||||||
|
|
||||||
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
||||||
{
|
{
|
||||||
/* Little endian means LS halfword first in byte stream */
|
/* Little endian means LS halfword first in byte stream */
|
||||||
|
|
||||||
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,10 +61,10 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Open the device/file write-only, try to create (file) it if it doesn't
|
/* Open the device/file write-only, try to create (file) it if it doesn't
|
||||||
* exist, if the file that already exists, then append the new log data to
|
* exist, if the file that already exists, then append the new log data to
|
||||||
* end of the file.
|
* end of the file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SYSLOG_OFLAGS (O_WRONLY | O_CREAT | O_APPEND)
|
#define SYSLOG_OFLAGS (O_WRONLY | O_CREAT | O_APPEND)
|
||||||
|
|
||||||
@@ -348,7 +348,7 @@ int syslog_initialize(void)
|
|||||||
g_sysdev.sl_state = SYSLOG_OPENED;
|
g_sysdev.sl_state = SYSLOG_OPENED;
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
errout_with_inode:
|
errout_with_inode:
|
||||||
inode_release(inode);
|
inode_release(inode);
|
||||||
g_sysdev.sl_state = SYSLOG_FAILURE;
|
g_sysdev.sl_state = SYSLOG_FAILURE;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ static inline int fat_parsesfname(const char **path,
|
|||||||
dirinfo->fd_name[ndx++] = ch;
|
dirinfo->fd_name[ndx++] = ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
errout:
|
errout:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -552,7 +552,7 @@ static inline int fat_parselfname(const char **path,
|
|||||||
dirinfo->fd_lfname[ndx++] = ch;
|
dirinfo->fd_lfname[ndx++] = ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
errout:
|
errout:
|
||||||
dirinfo->fd_lfname[0] = '\0';
|
dirinfo->fd_lfname[0] = '\0';
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -683,11 +683,11 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable)
|
|||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
errout_with_buffer:
|
errout_with_buffer:
|
||||||
fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize);
|
fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize);
|
||||||
fs->fs_buffer = 0;
|
fs->fs_buffer = 0;
|
||||||
|
|
||||||
errout:
|
errout:
|
||||||
fs->fs_mounted = false;
|
fs->fs_mounted = false;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ static inline int mkfatfs_writembr(FAR struct fat_format_s *fmt,
|
|||||||
/* Write all of the reserved sectors */
|
/* Write all of the reserved sectors */
|
||||||
|
|
||||||
memset(var->fv_sect, 0, var->fv_sectorsize);
|
memset(var->fv_sect, 0, var->fv_sectorsize);
|
||||||
for (sectno = 1; sectno < fmt->ff_rsvdseccount && ret >= 0; sectno++)
|
for (sectno = 1; sectno < fmt->ff_rsvdseccount && ret >= 0; sectno++)
|
||||||
{
|
{
|
||||||
ret = DEV_WRITE(var->fv_sect, sectno, 1);
|
ret = DEV_WRITE(var->fv_sect, sectno, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ static int mountpoint_filter(FAR struct inode *node,
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: foreach_mountpoint
|
* Name: foreach_mountpoint
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
|
|||||||
+5
-5
@@ -381,11 +381,11 @@ int mount(FAR const char *source, FAR const char *target,
|
|||||||
mountpt_inode->i_private = fshandle;
|
mountpt_inode->i_private = fshandle;
|
||||||
inode_semgive();
|
inode_semgive();
|
||||||
|
|
||||||
/* We can release our reference to the blkdrver_inode, if the filesystem
|
/* We can release our reference to the blkdrver_inode, if the filesystem
|
||||||
* wants to retain the blockdriver inode (which it should), then it must
|
* wants to retain the blockdriver inode (which it should), then it must
|
||||||
* have called inode_addref(). There is one reference on mountpt_inode
|
* have called inode_addref(). There is one reference on mountpt_inode
|
||||||
* that will persist until umount2() is called.
|
* that will persist until umount2() is called.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef BDFS_SUPPORT
|
#ifdef BDFS_SUPPORT
|
||||||
#ifdef NONBDFS_SUPPORT
|
#ifdef NONBDFS_SUPPORT
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void nxffs_wrle16(uint8_t *dest, uint16_t val)
|
|||||||
|
|
||||||
uint32_t nxffs_rdle32(FAR const uint8_t *val)
|
uint32_t nxffs_rdle32(FAR const uint8_t *val)
|
||||||
{
|
{
|
||||||
/* Little endian means LS halfword first in byte stream */
|
/* Little endian means LS halfword first in byte stream */
|
||||||
|
|
||||||
return (uint32_t)nxffs_rdle16(&val[2]) << 16 | (uint32_t)nxffs_rdle16(val);
|
return (uint32_t)nxffs_rdle16(&val[2]) << 16 | (uint32_t)nxffs_rdle16(val);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,9 +264,9 @@ FAR sem_t *sem_open (FAR const char *name, int oflags, ...)
|
|||||||
|
|
||||||
return sem;
|
return sem;
|
||||||
|
|
||||||
errout_with_inode:
|
errout_with_inode:
|
||||||
inode_release(inode);
|
inode_release(inode);
|
||||||
errout_with_lock:
|
errout_with_lock:
|
||||||
set_errno(errcode);
|
set_errno(errcode);
|
||||||
sched_unlock();
|
sched_unlock();
|
||||||
return (FAR sem_t *)ERROR;
|
return (FAR sem_t *)ERROR;
|
||||||
|
|||||||
@@ -2444,7 +2444,7 @@ static int unionfs_stat(FAR struct inode *mountpt, FAR const char *relpath,
|
|||||||
|
|
||||||
static int unionfs_getmount(FAR const char *path, FAR struct inode **inode)
|
static int unionfs_getmount(FAR const char *path, FAR struct inode **inode)
|
||||||
{
|
{
|
||||||
FAR struct inode *minode;
|
FAR struct inode *minode;
|
||||||
|
|
||||||
/* Find the mountpt */
|
/* Find the mountpt */
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -181,9 +181,9 @@ int mkdir(const char *pathname, mode_t mode)
|
|||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
errout_with_inode:
|
errout_with_inode:
|
||||||
inode_release(inode);
|
inode_release(inode);
|
||||||
errout:
|
errout:
|
||||||
set_errno(errcode);
|
set_errno(errcode);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -201,11 +201,11 @@ int open(const char *path, int oflags, ...)
|
|||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
|
|
||||||
errout_with_fd:
|
errout_with_fd:
|
||||||
files_release(fd);
|
files_release(fd);
|
||||||
errout_with_inode:
|
errout_with_inode:
|
||||||
inode_release(inode);
|
inode_release(inode);
|
||||||
errout:
|
errout:
|
||||||
set_errno(ret);
|
set_errno(ret);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -245,12 +245,12 @@ int rename(FAR const char *oldpath, FAR const char *newpath)
|
|||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||||
errout_with_newinode:
|
errout_with_newinode:
|
||||||
inode_release(newinode);
|
inode_release(newinode);
|
||||||
#endif
|
#endif
|
||||||
errout_with_oldinode:
|
errout_with_oldinode:
|
||||||
inode_release(oldinode);
|
inode_release(oldinode);
|
||||||
errout:
|
errout:
|
||||||
set_errno(errcode);
|
set_errno(errcode);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -225,9 +225,9 @@ int unlink(FAR const char *pathname)
|
|||||||
inode_release(inode);
|
inode_release(inode);
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
errout_with_inode:
|
errout_with_inode:
|
||||||
inode_release(inode);
|
inode_release(inode);
|
||||||
errout:
|
errout:
|
||||||
set_errno(errcode);
|
set_errno(errcode);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user