Consolidate buffer dumping; fix all occurrences of 'the the'

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1951 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-06-25 17:44:35 +00:00
parent a36541d67d
commit 33a6b7807e
38 changed files with 48 additions and 85 deletions

View File

@ -160,7 +160,7 @@ static inline irqstate_t irqsave(void)
{
unsigned short primask;
/* Return the the current value of primask register and set
/* Return the current value of primask register and set
* bit 0 of the primask register to disable interrupts
*/

View File

@ -86,7 +86,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
* signal handling so that the the user code final gets
* signal handling so that the user code final gets
* the correct errno value (probably EINTR).
*/

View File

@ -415,53 +415,16 @@ static void c5471_macassign(struct c5471_driver_s *c5471);
****************************************************************************/
#ifdef CONFIG_C5471_NET_DUMPBUFFER
static void c5471_dumpbuffer(const char *buffer, ssize_t nbytes)
static inline void c5471_dumpbuffer(const char *msg, const ubyte *buffer, unsigned int nbytes)
{
#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET)
char line[128];
int ch;
int i;
int j;
/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_NET have to be
* defined or the following does nothing.
*/
for (i = 0; i < nbytes; i += 16)
{
sprintf(line, "%04x: ", i);
for (j = 0; j < 16; j++)
{
if (i + j < nbytes)
{
sprintf(&line[strlen(line)], "%02x", buffer[i+j] );
}
else
{
strcpy(&line[strlen(line)], " ");
}
if (j == 7 || j == 15)
{
strcpy(&line[strlen(line)], " ");
}
}
for ( j = 0; j < 16; j++)
{
if (i + j < nbytes)
{
ch = buffer[i+j];
sprintf(&line[strlen(line)], "%c", ch >= 0x20 && ch <= 0x7e ? ch : '.');
}
if (j == 7 || j == 15)
{
strcpy(&line[strlen(line)], " ");
}
}
ndbg("%s\n", line);
}
#endif
nvdbgdumpbuffer(msg, buffer, nbytes);
}
#else
# define c5471_dumpbuffer(buffer,nbytes)
# define c5471_dumpbuffer(msg, buffer,nbytes)
#endif
/****************************************************************************
@ -494,7 +457,7 @@ static void c5471_mdtxbit (int bit_state)
putreg32((getreg32(GPIO_CIO) & ~GPIO_CIO_MDIO), GPIO_CIO);
/* Select the the bit output state */
/* Select the bit output state */
if (bit_state)
{
@ -907,7 +870,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471)
c5471->c_lastdescstart = c5471->c_rxcpudesc;
nvdbg("Packet size: %d RX CPU desc: %08x\n", nbytes, c5471->c_rxcpudesc);
c5471_dumpbuffer(dev->d_buf, dev->d_len);
c5471_dumpbuffer("Transmit packet", dev->d_buf, dev->d_len);
while (nbytes)
{
@ -1276,7 +1239,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
dev->d_len = packetlen;
nvdbg("Received packet, packetlen: %d type: %02x\n", packetlen, ntohs(BUF->type));
c5471_dumpbuffer(dev->d_buf, dev->d_len);
c5471_dumpbuffer("Received packet", dev->d_buf, dev->d_len);
/* We only accept IP packets of the configured type and ARP packets */
@ -2006,7 +1969,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471)
putreg32(ENET_ADR_BROADCAST|ENET_ADR_PROMISCUOUS, ENET0_ADRMODE_EN);
#else
/* The CPU port is not PROMISCUOUS, it wants a no-promiscuous address
* match yet the the SWITCH receives packets from the PROMISCUOUS ENET0
* match yet the SWITCH receives packets from the PROMISCUOUS ENET0
* which routes all packets for filter matching at the CPU port which
* then allows the s/w to see the new incoming packetes that passed
* the filter. Here we are setting the main SWITCH closest the ether

View File

@ -287,7 +287,7 @@ static int wdt_ioctl(struct file *filep, int cmd, uint32 arg)
{
dbg("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg);
/* Process the the IOCTL command (see arch/watchdog.h) */
/* Process the IOCTL command (see arch/watchdog.h) */
switch(cmd)
{

View File

@ -74,7 +74,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
* the task at the the head of the list). It most be
* the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new

View File

@ -136,7 +136,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
* a context switch must be perform to the next ready to run task.
*
****************************************************************************/

View File

@ -74,7 +74,7 @@
/* Macros to handle saving and restore interrupt state. In the current ARM
* model, the state is always copied to and from the stack and TCB. In the
* Cortex-M3 model, the state is copied from the stack to the TCB, but only
* a referenced is passed to get the the state from the TCB.
* a referenced is passed to get the state from the TCB.
*/
#ifdef CONFIG_ARCH_CORTEXM3

View File

@ -86,7 +86,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
* signal handling so that the the user code final gets
* signal handling so that the user code final gets
* the correct errno value (probably EINTR).
*/

View File

@ -110,7 +110,7 @@ up_phyrestart:
bic r0, r0, #(CR_S|CR_I|CR_V|CR_RR)
mcr p15, 0, r0, c1, c0, 0 /* Write control reg */
/* We know that the the bootloader entry point is at the
/* We know that the bootloader entry point is at the
* beginning of flash.
*/
#if 1

View File

@ -587,7 +587,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
* receipt are provided in the the return 'status'.
* receipt are provided in the return 'status'.
*
****************************************************************************/

View File

@ -911,7 +911,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
* receipt are provided in the the return 'status'.
* receipt are provided in the return 'status'.
*
****************************************************************************/

View File

@ -674,7 +674,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
* receipt are provided in the the return 'status'.
* receipt are provided in the return 'status'.
*
****************************************************************************/

View File

@ -612,7 +612,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
* receipt are provided in the the return 'status'.
* receipt are provided in the return 'status'.
*
****************************************************************************/

View File

@ -783,7 +783,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
* receipt are provided in the the return 'status'.
* receipt are provided in the return 'status'.
*
****************************************************************************/

View File

@ -59,7 +59,7 @@
* For SDCC, sizeof(int) is 16 and sizeof(long) is 32.
* long long and double are not supported.
*
* Generic pointers are 3 bytes in length with the the
* Generic pointers are 3 bytes in length with the
* first byte holding data space intformation.
*/

View File

@ -71,7 +71,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
* the task at the the head of the list). It most be
* the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new

View File

@ -69,7 +69,7 @@
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
* a context switch must be perform to the next ready to run task.
*
****************************************************************************/

View File

@ -71,7 +71,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
* the task at the the head of the list). It most be
* the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new

View File

@ -134,7 +134,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
* a context switch must be perform to the next ready to run task.
*
****************************************************************************/

View File

@ -906,7 +906,7 @@ static boolean up_rxavailable(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
/* Return true if the there is data available in the read buffer */
/* Return true if there is data available in the read buffer */
return ((up_serialin(priv, M16C_UART_C1) & UART_C1_RI) != 0);
}

View File

@ -87,7 +87,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
* signal handling so that the the user code final gets
* signal handling so that the user code final gets
* the correct errno value (probably EINTR).
*/

View File

@ -644,7 +644,7 @@ static int up_interrupt(int irq, void *context)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the SCI. Error bits associated with the
* receipt are provided in the the return 'status'.
* receipt are provided in the return 'status'.
*
****************************************************************************/

View File

@ -87,7 +87,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
* signal handling so that the the user code final gets
* signal handling so that the user code final gets
* the correct errno value (probably EINTR).
*/

View File

@ -71,7 +71,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
* the task at the the head of the list). It most be
* the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new

View File

@ -68,7 +68,7 @@
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
* a context switch must be perform to the next ready to run task.
*
****************************************************************************/

View File

@ -163,7 +163,7 @@
#ifndef __ASSEMBLY__
/* This is the the type of the register save array */
/* This is the type of the register save array */
typedef uint16 chipreg_t;

View File

@ -74,7 +74,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
* the task at the the head of the list). It most be
* the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new

View File

@ -138,7 +138,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
* a context switch must be perform to the next ready to run task.
*
****************************************************************************/

View File

@ -87,7 +87,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
* so that the the user code final gets the correct errno value (probably
* so that the user code final gets the correct errno value (probably
* EINTR).
*/

View File

@ -89,7 +89,7 @@ void z16f_sysexec(FAR chipreg_t *regs)
current_regs = regs;
/* The cause of the the system exception is indicated in the SYSEXCPH&L
/* The cause of the system exception is indicated in the SYSEXCPH&L
* registers
*/

View File

@ -304,7 +304,7 @@
#ifndef __ASSEMBLY__
/* This is the the type of the register save array */
/* This is the type of the register save array */
typedef uint16 chipreg_t;

View File

@ -88,7 +88,7 @@
#ifndef __ASSEMBLY__
/* This is the the type of the register save array */
/* This is the type of the register save array */
typedef uint16 chipreg_t;

View File

@ -75,7 +75,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
* the task at the the head of the list). It most be
* the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new

View File

@ -138,7 +138,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
* a context switch must be perform to the next ready to run task.
*
****************************************************************************/

View File

@ -2119,7 +2119,7 @@ int up_multicastfilter(FAR struct uip_driver_s *dev, FAR ubyte *mac, boolean ena
* is '0', the multicast packet is rejected.
*/
/* Apply the hash algorithm to the the hash table index and bit number
/* Apply the hash algorithm to the hash table index and bit number
* corresponding to this MAC
*/

View File

@ -88,7 +88,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
* so that the the user code final gets the correct errno value (probably
* so that the user code final gets the correct errno value (probably
* EINTR).
*/

View File

@ -102,7 +102,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
* so that the the user code final gets the correct errno value (probably
* so that the user code final gets the correct errno value (probably
* EINTR).
*/

View File

@ -87,7 +87,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
* so that the the user code final gets the correct errno value (probably
* so that the user code final gets the correct errno value (probably
* EINTR).
*/