[PATCH 2/3] powerpc/motorola_powerpc: Fix tm27 warnings

chrisj at rtems.org chrisj at rtems.org
Sat Feb 13 02:24:00 UTC 2021


From: Chris Johns <chrisj at rtems.org>

---
 bsps/powerpc/motorola_powerpc/include/tm27.h | 24 +++++++++++++-------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/bsps/powerpc/motorola_powerpc/include/tm27.h b/bsps/powerpc/motorola_powerpc/include/tm27.h
index 4d616cb3ed..15e66f2a81 100644
--- a/bsps/powerpc/motorola_powerpc/include/tm27.h
+++ b/bsps/powerpc/motorola_powerpc/include/tm27.h
@@ -25,15 +25,23 @@
 
 #define MUST_WAIT_FOR_INTERRUPT 1
 
-void nullFunc(void) {}
-static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
-					      0,
-					      (rtems_irq_enable) nullFunc,
-					      (rtems_irq_disable) nullFunc,
-					      (rtems_irq_is_enabled) nullFunc};
-static void Install_tm27_vector(void (*_handler)(void))
+static void null_irq_enable(const rtems_irq_connect_data* a) { (void) a; }
+static void null_irq_disable(const rtems_irq_connect_data* a) { (void) a; }
+static int null_irq_is_enabled(const rtems_irq_connect_data* a) { (void) a; return 0; }
+
+static rtems_irq_connect_data clockIrqData =
+{
+ .name = BSP_DECREMENTER,
+ .hdl = 0,
+ .handle = 0,
+ .on = null_irq_enable,
+ .off = null_irq_disable,
+ .isOn = null_irq_is_enabled
+};
+
+static void Install_tm27_vector(rtems_isr (*_handler)(rtems_vector_number))
 {
-  clockIrqData.hdl = _handler;
+  clockIrqData.hdl = (rtems_irq_hdl) _handler;
   if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
 	printk("Error installing clock interrupt handler!\n");
 	rtems_fatal_error_occurred(1);
-- 
2.24.1



More information about the devel mailing list