[PATCH 01/10] Make printk_plugin() static

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Jun 21 13:57:46 UTC 2016


---
 cpukit/include/rtems/bspIo.h           | 10 ----------
 cpukit/libcsupport/src/printk_plugin.c | 19 +++++++++----------
 2 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/cpukit/include/rtems/bspIo.h b/cpukit/include/rtems/bspIo.h
index a7fd959..958103a 100644
--- a/cpukit/include/rtems/bspIo.h
+++ b/cpukit/include/rtems/bspIo.h
@@ -142,16 +142,6 @@ extern void rtems_putc(char c);
 typedef int (*rtems_print_plugin_t)(void *, const char *format, va_list ap);
 
 /**
- * @brief Reporting Methods printk() Plugin
- *
- * @param[in] context Unused.
- * @param[in] fmt is a printf()-style format string
- *
- * @return The number of characters printed.
- */
-extern int printk_plugin(void *context, const char *fmt, va_list ap);
-
-/**
  * @brief Reporting Methods printf() Plugin
  *
  * This is a standard plug-in to support using printf() for output
diff --git a/cpukit/libcsupport/src/printk_plugin.c b/cpukit/libcsupport/src/printk_plugin.c
index 3ecacb8..485346d 100644
--- a/cpukit/libcsupport/src/printk_plugin.c
+++ b/cpukit/libcsupport/src/printk_plugin.c
@@ -18,18 +18,9 @@
 #include "config.h"
 #endif
 
-#include <stdarg.h>
 #include <rtems/print.h>
 
-void rtems_print_printer_printk(
-  rtems_printer *printer
-)
-{
-  printer->context = NULL;
-  printer->printer = printk_plugin;
-}
-
-int printk_plugin(
+static int printk_plugin(
   void *ignored,
   const char *format,
   va_list ap
@@ -39,3 +30,11 @@ int printk_plugin(
   vprintk( format, ap );
   return 0;
 }
+
+void rtems_print_printer_printk(
+  rtems_printer *printer
+)
+{
+  printer->context = NULL;
+  printer->printer = printk_plugin;
+}
-- 
1.8.4.5




More information about the devel mailing list