Fix checkpatch issue - WARNING:LINE_SPACING

Adding a line after variable declaration in order to comply with
the defined coding style.

Change-Id: Id41af88404bd37227bfd59a2d71ce08d0d6ce005
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-14 17:15:52 -05:00 committed by Anas Nashif
parent b5e560fa81
commit 5b5f4eb948
30 changed files with 51 additions and 0 deletions

View file

@ -59,6 +59,7 @@ the PendSV exception.
void _IntLibInit(void)
{
int irq = 0;
for (; irq < CONFIG_NUM_IRQS; irq++) {
_NvicIrqPrioSet(irq, _EXC_IRQ_DEFAULT_PRIO);
}

View file

@ -70,6 +70,7 @@ static struct k_args cmdpacket;
void _TaskAbort(void)
{
const int taskAbortCode = 1;
if (_ScbIsInThreadMode()) {
_task_ioctl(K_Task->Ident, taskAbortCode);
} else {

View file

@ -61,6 +61,7 @@ Exception/interrupt context helpers.
static ALWAYS_INLINE uint32_t _IpsrGet(void)
{
uint32_t vector;
__asm__ volatile("mrs %0, IPSR\n\t" : "=r"(vector));
return vector;
}

View file

@ -106,6 +106,7 @@ __asm volatile void _MspSet(uint32_t msp)
static ALWAYS_INLINE void _InterruptStackSetup(void)
{
uint32_t msp = __GET_MSP();
_MspSet(msp);
}

View file

@ -198,6 +198,7 @@ static ALWAYS_INLINE void fiberRtnValueSet(
)
{
tESF *pEsf = (void *)fiber->preempReg.psp;
pEsf->a1 = value;
}

View file

@ -462,6 +462,7 @@ static uint32_t ioApicRedGetLo(unsigned int irq /* INTIN number */
{
#ifdef XIOAPIC_DIRECT_ADDRESSING
volatile uint32_t *pEntry; /* pointer to redirection table entry */
pEntry = (volatile uint32_t *)(IOAPIC_BASE_ADRS + (irq * 0x10) +
IOAPIC_RTE0_LOW);
@ -488,6 +489,7 @@ static void ioApicRedSetLo(unsigned int irq, /* INTIN number */
{
#ifdef XIOAPIC_DIRECT_ADDRESSING
volatile uint32_t *pEntry; /* pointer to redirection table entry */
pEntry = (volatile uint32_t *)(IOAPIC_BASE_ADRS + (irq * 0x10) +
IOAPIC_RTE0_LOW);
@ -514,6 +516,7 @@ static void ioApicRedSetHi(unsigned int irq, /* INTIN number */
{
#ifdef XIOAPIC_DIRECT_ADDRESSING
volatile uint32_t *pEntry; /* pointer to redirection table entry */
pEntry = (volatile uint32_t *)(IOAPIC_BASE_ADRS + (irq * 0x10) +
IOAPIC_RTE0_HIGH);

View file

@ -353,6 +353,7 @@ int pci_dev_find(int class, int idx, uint32_t *addr, uint32_t *size, int *irq)
{
int i;
int j;
for (i = 0, j = 0; i < dev_info_idx; i++) {
if (dev_info[i].class != class)
continue;

View file

@ -350,6 +350,7 @@ int uart_fifo_fill(int which, /* UART on which to send */
)
{
int i;
for (i = 0; i < size && (INBYTE(LSR(which)) & LSR_THRE) != 0; i++) {
OUTBYTE(THR(which), txData[i]);
}
@ -369,6 +370,7 @@ int uart_fifo_read(int which, /* UART to receive from */
)
{
int i;
for (i = 0; i < size && (INBYTE(LSR(which)) & LSR_RXRDY) != 0; i++) {
rxData[i] = INBYTE(RDR(which));
}

View file

@ -196,6 +196,7 @@ static void baudrateSet(int port, uint32_t baudrate, uint32_t sysClkFreqInHz)
static inline void enable(int port)
{
volatile struct _Uart *pUart = ports[port].base;
pUart->ctl |= UARTCTL_UARTEN;
}
@ -244,6 +245,7 @@ static inline void disable(int port)
static inline void lineControlDefaultsSet(int port)
{
volatile struct _Uart *pUart = ports[port].base;
pUart->lcrh = LINE_CONTROL_DEFAULTS;
}
@ -282,6 +284,7 @@ void uart_init(int port, /* UART channel to initialize */
static int pollTxReady(int port)
{
volatile struct _Uart *pUart = ports[port].base;
return (pUart->fr & UARTFR_TXFE);
}

View file

@ -119,6 +119,7 @@ static void get_options(int argc, char *argv[])
{
char *endptr;
int ii, opt;
while ((opt = getopt(argc, argv, "hi:o:n:v")) != -1)
{
switch(opt)
@ -169,6 +170,7 @@ static void get_options(int argc, char *argv[])
static void get_exec_name(char *pathname)
{
int end = strlen(pathname)-1;
while(end != -1)
{
#if defined (WINDOWS) /* Might have both slashes in path */
@ -190,6 +192,7 @@ static void get_exec_name(char *pathname)
static void open_files(void)
{
int ii;
fds[IFILE] = open(filenames[IFILE], O_RDONLY|O_BINARY);
fds[OFILE] = open(filenames[OFILE], O_WRONLY|O_CREAT|O_TRUNC|O_BINARY,
S_IWUSR|S_IRUSR);
@ -300,6 +303,7 @@ readError:
static void close_files(void)
{
int ii;
for(ii = 0; ii < NUSERFILES; ii++)
{
close(fds[ii]);

View file

@ -102,6 +102,7 @@ int main(int argc, char *argv[])
static void get_options(int argc, char *argv[])
{
int ii, opt;
while ((opt = getopt(argc, argv, "hi:o:v")) != -1) {
switch(opt) {
case 'i':
@ -154,6 +155,7 @@ static void open_files(void)
static void write_str(const char *str)
{
int len = strlen(str);
if (write(fds[OFILE], str, len) != len) {
perror("write");
clean_exit(-1);
@ -226,6 +228,7 @@ static void generate_files(void)
static void close_files(void)
{
int ii;
for(ii = 0; ii < NUSERFILES; ii++) {
close(fds[ii]);
}

View file

@ -36,6 +36,7 @@
const char *basename(const char *pathname)
{
int end = strlen(pathname)-1;
while(end != -1) {
if (is_path_separator(pathname[end])) {
if (0 == end || pathname[end-1] != '\\') {

View file

@ -80,6 +80,7 @@ void mycopypacket(struct k_args **out,
int CalcFreeReaderSpace(struct k_args *pReaderList)
{
int iSize = 0;
if (pReaderList) {
struct k_args *pReader = pReaderList;
while (pReader != NULL) {
@ -94,6 +95,7 @@ int CalcFreeReaderSpace(struct k_args *pReaderList)
int CalcAvailWriterData(struct k_args *pWriterList)
{
int iSize = 0;
if (pWriterList) {
struct k_args *pWriter = pWriterList;
while (pWriter != NULL) {

View file

@ -114,6 +114,7 @@ void BuffGetFreeSpace(struct chbuff *pChBuff,
int iFreeSpaceCont;
int iFreeSpaceAWA;
int iFreeSpaceTotal;
iFreeSpaceTotal =
CalcFreeSpace(pChBuff, &iFreeSpaceCont, &iFreeSpaceAWA);
__ASSERT_NO_MSG(iFreeSpaceCont == pChBuff->iFreeSpaceCont);
@ -140,6 +141,7 @@ void BuffGetAvailData(struct chbuff *pChBuff,
int iAvailDataCont;
int iAvailDataAWA;
int iAvailDataTotal;
iAvailDataTotal =
CalcAvailData(pChBuff, &iAvailDataCont, &iAvailDataAWA);
__ASSERT_NO_MSG(iAvailDataCont == pChBuff->iAvailDataCont);
@ -571,6 +573,7 @@ int BuffFull(struct chbuff *pChBuff)
{/* remark: 0==iTotalFreeSpace is an INcorrect condition b/c of async. behavior
*/
int iAvailDataTotal;
BuffGetAvailDataTotal(pChBuff, &iAvailDataTotal);
return (pChBuff->iBuffSize == iAvailDataTotal);
}
@ -579,6 +582,7 @@ int BuffEmpty(struct chbuff *pChBuff)
{/* remark: 0==iAvailDataTotal is an INcorrect condition b/c of async. behavior
*/
int iTotalFreeSpace;
BuffGetFreeSpaceTotal(pChBuff, &iTotalFreeSpace);
return (pChBuff->iBuffSize == iTotalFreeSpace);
}

View file

@ -55,6 +55,7 @@ int MarkerAddLast(struct marker_list *pMarkerList,
BOOL bXferBusy)
{
int i = MarkerFindFree(pMarkerList->aMarkers);
if (i == -1)
return i;
pMarkerList->aMarkers[i].pointer = pointer;
@ -123,6 +124,7 @@ void MarkersClear(struct marker_list *pMarkerList)
{
struct marker *pM = pMarkerList->aMarkers;
int i;
for (i = 0; i < MAXNBR_MARKERS; i++, pM++) {
k_memset(pM, 0, sizeof(struct marker));
/*pM->pointer =NULL; */
@ -158,6 +160,7 @@ int MarkerFindFree(struct marker aMarkers[])
{
struct marker *pM = aMarkers;
int i;
for (i = 0; i < MAXNBR_MARKERS; i++, pM++) {
if (NULL == pM->pointer) {
break;

View file

@ -83,6 +83,7 @@ void kernel_init(void)
* main())
*/
extern uint64_t __main_tsc;
__main_tsc = _NanoTscRead();
#endif

View file

@ -96,6 +96,7 @@ void K_alloctmo(struct k_args *A)
void K_alloc(struct k_args *A)
{
struct map_struct *M = K_MapList + OBJ_INDEX(A->Args.a1.mmap);
if (M->Free != NULL) {
*(A->Args.a1.mptr) = M->Free;
M->Free = *(char **)(M->Free);

View file

@ -474,6 +474,7 @@ ksem_t _task_sem_group_take(ksemg_t group, /* group of semaphores to test */
void K_signals(struct k_args *A)
{
uint32_t Sid = A->Args.s1.sema;
signal_semaphore(1, K_SemList + OBJ_INDEX(Sid));
}
@ -593,6 +594,7 @@ void isr_sem_give(ksem_t sema, /* semaphore to signal */
void K_resets(struct k_args *A)
{
uint32_t Sid = A->Args.s1.sema;
K_SemList[OBJ_INDEX(Sid)].Level = 0;
}

View file

@ -51,6 +51,7 @@ int64_t K_LowTime = 0;
void _LowTimeInc(int inc)
{
int key = irq_lock_inline();
K_LowTime += inc;
irq_unlock_inline(key);
}
@ -60,6 +61,7 @@ int64_t _LowTimeGet(void)
int64_t ticks;
int key = irq_lock_inline();
ticks = K_LowTime;
irq_unlock_inline(key);
return ticks;
}

View file

@ -57,6 +57,7 @@ data structure.
void nano_cpu_set_idle(int32_t ticks)
{
extern tNANO _NanoKernel;
_NanoKernel.idle = ticks;
}

View file

@ -176,6 +176,7 @@ void printk(const char *fmt, /* formatted string to output */
...)
{
va_list ap;
va_start(ap, fmt);
_vprintk(fmt, ap);
va_end(ap);
@ -196,6 +197,7 @@ static void _printk_hex_ulong(
)
{
int size = sizeof(num) * 2;
for (; size; size--) {
char nibble = (num >> ((size - 1) << 2) & 0xf);
nibble += nibble > 9 ? 87 : 48;
@ -220,6 +222,7 @@ static void _printk_dec_ulong(
unsigned long pos = 999999999;
unsigned long remainder = num;
int found_largest_digit = 0;
while (pos >= 9) {
if (found_largest_digit || remainder > pos) {
found_largest_digit = 1;

View file

@ -99,6 +99,7 @@ static void myDelay
task_sleep (ticks);
#else
struct nano_timer timer;
nano_timer_init (&timer, (void *) 0);
nano_fiber_timer_start (&timer, ticks);
nano_fiber_timer_wait (&timer);

View file

@ -161,6 +161,7 @@ extern void event_test (void);
static inline uint32_t BENCH_START (void)
{
uint32_t et;
bench_test_start ();
et = TIME_STAMP_DELTA_GET (0);
return et;

View file

@ -68,6 +68,7 @@ static uint32_t timestamp;
int microSemaLockUnlock (void)
{
int i;
PRINT_FORMAT (" 3- Measure average time to signal a sema then test"
" that sema");
bench_test_start ();
@ -125,6 +126,7 @@ int microSemaLockUnlock (void)
int microMutexLockUnlock (void)
{
int i;
PRINT_FORMAT (" 4- Measure average time to lock a mutex then"
" unlock that mutex");
timestamp = TIME_STAMP_DELTA_GET (0);

View file

@ -120,6 +120,7 @@ static inline uint32_t TIME_STAMP_DELTA_GET (uint32_t ts)
static inline void bench_test_init (void)
{
uint32_t t = OS_GET_TIME ();
tm_off = OS_GET_TIME () - t;
}

View file

@ -95,6 +95,7 @@ int inttypesTest (void)
intmax_t numer = n;
intmax_t denom = d;
imaxdiv_t result = imaxdiv (numer, denom);
if ((result.quot != n/d) || (result.rem != n%d))
return TC_FAIL;

View file

@ -618,6 +618,7 @@ int RegressionTask (void)
int tcRC;
int value;
ksem_t semBlockList[4];
semBlockList[0] = blockHpSem;
semBlockList[1] = blockMpSem;
semBlockList[2] = blockLpSem;

View file

@ -112,6 +112,7 @@ void check_input(const char *name, const char *input)
{
/* Stack will overflow when input is more than 16 characters */
char buf[16];
strcpy(buf, input);
TC_PRINT("%s: %s\n", name, buf);
}

View file

@ -76,6 +76,7 @@ void begin_test (void);
static inline uint32_t BENCH_START (void)
{
uint32_t et;
begin_test ();
et = TIME_STAMP_DELTA_GET (0);
return et;

View file

@ -629,6 +629,7 @@ void main(void)
{
void *pData; /* pointer to FIFO object get from the queue */
int count = 0; /* counter */
TC_START("Test Nanokernel FIFO");
/* Initialize the FIFO queues and semaphore */