[PATCH 38/42] powerpc/qemuppc: Fix warnings

Joel Sherrill joel.sherrill at oarcorp.com
Fri Oct 17 15:23:54 UTC 2014


---
 c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h   | 19 ++++++++++++-------
 c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c  | 20 ++++++++++++--------
 c/src/lib/libbsp/powerpc/qemuppc/startup/cmain.c |  1 -
 3 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h b/c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h
index 7f0c19c..4da204a 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/qemuppc/include/bsp.h
@@ -1,8 +1,10 @@
 /*
  *  This include file contains some definitions specific to the
  *  qemu powerpc Prep simulator
- *
- *  COPYRIGHT (c) 1989-2009.
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2014.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -13,6 +15,8 @@
 #ifndef _BSP_H
 #define _BSP_H
 
+#ifndef ASM
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -32,14 +36,15 @@ extern "C" {
 #define BSP_Convert_decrementer( _value ) \
   ((int) (((_value) * 10) / bsp_clicks_per_usec))
 
-#if 0
-/* support for simulated clock tick */
-Thread clock_driver_sim_idle_body(uintptr_t);
-#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
-#endif
+/*
+ * Prototypes for methods that are referenced from .S
+ */
+void cmain(void);
 
 #ifdef __cplusplus
 }
 #endif
 
+#endif /* !ASM */
+
 #endif
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c b/c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c
index f79607d..f4592a3 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c
@@ -23,9 +23,13 @@
 
 #include <bsp.h>
 #include <bsp/irq.h>
+#include <bsp/irq-generic.h>
 #include <bsp/vectors.h>
 
-int qemuppc_exception_handler( BSP_Exception_frame *frame, unsigned exception_number)
+static int qemuppc_exception_handler(
+  BSP_Exception_frame *frame,
+  unsigned exception_number
+)
 {
   BSP_panic("Unexpected interrupt occured");
   return 0;
@@ -37,21 +41,21 @@ int qemuppc_exception_handler( BSP_Exception_frame *frame, unsigned exception_nu
 rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
 {
   /* FIXME: do something */
-	return RTEMS_SUCCESSFUL;
+  return RTEMS_SUCCESSFUL;
 }
 
 rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqnum)
 {
   /* FIXME: do something */
-	return RTEMS_SUCCESSFUL;
+  return RTEMS_SUCCESSFUL;
 }
 
 rtems_status_code bsp_interrupt_facility_initialize(void)
 {
-	/* Install exception handler */
-	if (ppc_exc_set_handler( ASM_EXT_VECTOR, qemuppc_exception_handler)) {
-		return RTEMS_IO_ERROR;
-	}
+  /* Install exception handler */
+  if (ppc_exc_set_handler( ASM_EXT_VECTOR, qemuppc_exception_handler)) {
+    return RTEMS_IO_ERROR;
+  }
 
-	return RTEMS_SUCCESSFUL;
+  return RTEMS_SUCCESSFUL;
 }
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/startup/cmain.c b/c/src/lib/libbsp/powerpc/qemuppc/startup/cmain.c
index 5b717e2..21a02e0 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/startup/cmain.c
+++ b/c/src/lib/libbsp/powerpc/qemuppc/startup/cmain.c
@@ -37,7 +37,6 @@ extern unsigned char __sbss2_start[], __sbss2_end[];
 extern unsigned char __sbss_start[], __sbss_end[];
 extern unsigned char __bss_start[], __bss_end[];
 
-
 void cmain (void)
 {
   /*
-- 
1.9.3




More information about the devel mailing list