From c16648b3fd65fc33d8603a869d27e65241774072 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 1 Dec 2015 12:54:57 -0600 Subject: [PATCH] Most cosmetic but also includes a fix for a compile problem from Ken Pettit --- drivers/mtd/mtd_onfi.c | 12 +++--------- drivers/net/enc28j60.h | 3 ++- net/icmp/icmp_send.c | 12 ------------ sched/timer/timer_create.c | 6 +++--- sched/timer/timer_release.c | 12 ------------ sched/timer/timer_settime.c | 2 +- 6 files changed, 9 insertions(+), 38 deletions(-) diff --git a/drivers/mtd/mtd_onfi.c b/drivers/mtd/mtd_onfi.c index 9a6f6c312a..aa4c6a09c0 100644 --- a/drivers/mtd/mtd_onfi.c +++ b/drivers/mtd/mtd_onfi.c @@ -113,17 +113,10 @@ *(volatile uint8_t *)((uintptr_t)a) = (uint8_t)d; \ } while (0) -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ + /**************************************************************************** * Name: onfi_readstatus * @@ -216,6 +209,7 @@ bool onfi_have_embeddedecc(FAR struct onfi_pgparam_s *onfi) /**************************************************************************** * Public Functions ****************************************************************************/ + /**************************************************************************** * Name: onfi_compatible * @@ -340,7 +334,7 @@ int onfi_read(uintptr_t cmdaddr, uintptr_t addraddr, uintptr_t dataaddr, /* Get number of spare bytes per page (bytes 84-85 in the param table) */ - onfi->sparesize = *(FAR uint16_t *)(FAR voidFAR *)(parmtab + 84); + onfi->sparesize = *(FAR uint16_t *)(FAR void *)(parmtab + 84); /* Number of pages per block. */ diff --git a/drivers/net/enc28j60.h b/drivers/net/enc28j60.h index faa1546118..324efa4bac 100644 --- a/drivers/net/enc28j60.h +++ b/drivers/net/enc28j60.h @@ -460,7 +460,8 @@ #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif diff --git a/net/icmp/icmp_send.c b/net/icmp/icmp_send.c index 076d598a0c..b92e992704 100644 --- a/net/icmp/icmp_send.c +++ b/net/icmp/icmp_send.c @@ -59,18 +59,6 @@ #define ICMPBUF ((struct icmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)]) -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Variables - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/sched/timer/timer_create.c b/sched/timer/timer_create.c index a750a879b4..bf6429e3bc 100644 --- a/sched/timer/timer_create.c +++ b/sched/timer/timer_create.c @@ -76,7 +76,7 @@ * ********************************************************************************/ -static struct posix_timer_s *timer_allocate(void) +static FAR struct posix_timer_s *timer_allocate(void) { FAR struct posix_timer_s *ret; irqstate_t flags; @@ -177,8 +177,8 @@ static struct posix_timer_s *timer_allocate(void) int timer_create(clockid_t clockid, FAR struct sigevent *evp, FAR timer_t *timerid) { - struct posix_timer_s *ret; - WDOG_ID wdog; + FAR struct posix_timer_s *ret; + WDOG_ID wdog; /* Sanity checks. Also, we support only CLOCK_REALTIME */ diff --git a/sched/timer/timer_release.c b/sched/timer/timer_release.c index 85e5b857c3..05de32cd9e 100644 --- a/sched/timer/timer_release.c +++ b/sched/timer/timer_release.c @@ -48,18 +48,6 @@ #ifndef CONFIG_DISABLE_POSIX_TIMERS -/******************************************************************************** - * Pre-processor Definitions - ********************************************************************************/ - -/******************************************************************************** - * Private Data - ********************************************************************************/ - -/******************************************************************************** - * Public Data - ********************************************************************************/ - /******************************************************************************** * Private Functions ********************************************************************************/ diff --git a/sched/timer/timer_settime.c b/sched/timer/timer_settime.c index 01be3a28ae..4df42217ee 100644 --- a/sched/timer/timer_settime.c +++ b/sched/timer/timer_settime.c @@ -195,7 +195,7 @@ static void timer_timeout(int argc, wdparm_t itimer) if (timer_release(u.timer)) { - /* If this is a repetitive timer, the restart the watchdog */ + /* If this is a repetitive timer, then restart the watchdog */ timer_restart(u.timer, itimer); }