diff mbox

[U-Boot] stdio: staticize locally-used call-backs

Message ID 1412118105-8499-1-git-send-email-eric.nelson@boundarydevices.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Eric Nelson Sept. 30, 2014, 11:01 p.m. UTC
The various nulldev_x and stdio_serial_x calls are only used indirectly
through the nulldev and serial devices, so make them static and
prevent the dreaded "Should it be static?" warning with "make C=1".

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 common/stdio.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Tom Rini Oct. 27, 2014, 10:19 p.m. UTC | #1
On Tue, Sep 30, 2014 at 04:01:45PM -0700, Eric Nelson wrote:

> The various nulldev_x and stdio_serial_x calls are only used indirectly
> through the nulldev and serial devices, so make them static and
> prevent the dreaded "Should it be static?" warning with "make C=1".
> 
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/stdio.c b/common/stdio.c
index c878103..523d859 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -36,39 +36,39 @@  char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };
 
 
 #ifdef CONFIG_SYS_DEVICE_NULLDEV
-void nulldev_putc(struct stdio_dev *dev, const char c)
+static void nulldev_putc(struct stdio_dev *dev, const char c)
 {
 	/* nulldev is empty! */
 }
 
-void nulldev_puts(struct stdio_dev *dev, const char *s)
+static void nulldev_puts(struct stdio_dev *dev, const char *s)
 {
 	/* nulldev is empty! */
 }
 
-int nulldev_input(struct stdio_dev *dev)
+static int nulldev_input(struct stdio_dev *dev)
 {
 	/* nulldev is empty! */
 	return 0;
 }
 #endif
 
-void stdio_serial_putc(struct stdio_dev *dev, const char c)
+static void stdio_serial_putc(struct stdio_dev *dev, const char c)
 {
 	serial_putc(c);
 }
 
-void stdio_serial_puts(struct stdio_dev *dev, const char *s)
+static void stdio_serial_puts(struct stdio_dev *dev, const char *s)
 {
 	serial_puts(s);
 }
 
-int stdio_serial_getc(struct stdio_dev *dev)
+static int stdio_serial_getc(struct stdio_dev *dev)
 {
 	return serial_getc();
 }
 
-int stdio_serial_tstc(struct stdio_dev *dev)
+static int stdio_serial_tstc(struct stdio_dev *dev)
 {
 	return serial_tstc();
 }