From ad5143634d008a58f4eac65f7d65e9118e642140 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 15 Oct 2014 14:22:36 -0500 Subject: libcpu/powerpc/mpc6xx: Fix warnings --- c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c | 29 ++----------------------- c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c | 17 +++++++++------ 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c index 75ef38bb86..f14acab1d8 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c +++ b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c @@ -8,7 +8,7 @@ */ /* - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2014. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may in @@ -93,7 +93,7 @@ static void clockHandler(void) } while ( _Thread_Heir == _Thread_Executing && _Thread_Executing->Start.entry_point - == rtems_configuration_get_idle_task() + == (Thread_Entry) rtems_configuration_get_idle_task() ); #else @@ -150,14 +150,6 @@ void clockIsr(void *unused) * for bookE CPUs. For efficiency reasons we * provide a separate handler rather than * checking the CPU type each time. - * - * Input parameters: - * vector - vector number - * - * Output parameters: NONE - * - * Return values: NONE - * */ void clockIsrBookE(void *unused) { @@ -195,13 +187,6 @@ int clockIsOn(void* unused) * * This routine allows the clock driver to exit by masking the interrupt and * disabling the clock's counter. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: NONE - * */ void Clock_exit( void ) { @@ -228,16 +213,6 @@ static uint32_t Clock_driver_nanoseconds_since_last_tick(void) * Clock_initialize * * This routine initializes the clock driver. - * - * Input parameters: - * major - clock device major number - * minor - clock device minor number - * parg - pointer to optional device driver arguments - * - * Output parameters: NONE - * - * Return values: - * rtems_device_driver status code */ rtems_device_driver Clock_initialize( rtems_device_major_number major, diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c index fe1000a319..1e0c66582a 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c +++ b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c @@ -1,5 +1,6 @@ -/* Trivial page table setup for RTEMS - * Purpose: allow write protection of text/ro-data +/* + * Trivial page table setup for RTEMS + * Purpose: allow write protection of text/RO-data */ /* @@ -193,7 +194,8 @@ whatPrintf (void) #endif #ifdef DEBUG -unsigned long triv121PgTblConsistency (Triv121PgTbl pt, int pass, int expect); +static unsigned long triv121PgTblConsistency( + Triv121PgTbl pt, int pass, int expect); static int consistencyPass = 0; #define CONSCHECK(expect) triv121PgTblConsistency(&pgTbl,consistencyPass++,(expect)) @@ -304,12 +306,11 @@ static APte slotFor (Triv121PgTbl pt, unsigned long vsid, unsigned long pi) { int i; - unsigned long hash, api; + unsigned long hash; APte pte; /* primary hash */ hash = PTE_HASH1 (vsid, pi); - api = API (pi); /* linear search thru all buckets for this hash */ for (i = 0, pte = ptegOf (pt, hash); i < PTE_PER_PTEG; i++, pte++) { if (!pte->v && !pte->marked) { @@ -707,6 +708,7 @@ myhdl (BSP_Exception_frame * excPtr) +#ifdef DEBUG /* test the consistency of the page table * * 'pass' is merely a number which will be printed @@ -725,7 +727,7 @@ myhdl (BSP_Exception_frame * excPtr) * * RETURNS: total number of valid plus 'marked' slots. */ -unsigned long +static unsigned long triv121PgTblConsistency (Triv121PgTbl pt, int pass, int expected) { APte pte; @@ -822,6 +824,7 @@ triv121PgTblConsistency (Triv121PgTbl pt, int pass, int expected) } return v; } +#endif /* Find the PTE for a EA and print its contents * RETURNS: pte for EA or NULL if no entry was found. @@ -1072,6 +1075,7 @@ dumpPte (APte pte) } +#if defined(DEBUG_MAIN) /* dump page table entries from index 'from' to 'to' * The special values (unsigned)-1 are allowed which * cause the routine to dump the entire table. @@ -1096,7 +1100,6 @@ triv121PgTblDump (Triv121PgTbl pt, unsigned from, unsigned to) } -#if defined(DEBUG_MAIN) #define LD_DBG_PT_SIZE LD_MIN_PT_SIZE -- cgit v1.2.3