* [U-Boot] [PATCH] serial: make serial_stub_* to static functions
@ 2017-06-22 7:48 Masahiro Yamada
2017-06-22 8:18 ` Bin Meng
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Masahiro Yamada @ 2017-06-22 7:48 UTC (permalink / raw)
To: u-boot
Add missing static to serial_stub_puts().
Unexport serial_stub_{getc,tstc} because they are used locally.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/serial/serial-uclass.c | 11 +++++++----
drivers/serial/serial.c | 4 ++--
include/common.h | 5 -----
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index a9c4f89e1a09..200f4b9fd720 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -212,27 +212,30 @@ void serial_stdio_init(void)
{
}
-#if defined(CONFIG_DM_STDIO) && CONFIG_IS_ENABLED(SERIAL_PRESENT)
+#if defined(CONFIG_DM_STDIO)
+
+#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
{
_serial_putc(sdev->priv, ch);
}
#endif
-void serial_stub_puts(struct stdio_dev *sdev, const char *str)
+static void serial_stub_puts(struct stdio_dev *sdev, const char *str)
{
_serial_puts(sdev->priv, str);
}
-int serial_stub_getc(struct stdio_dev *sdev)
+static int serial_stub_getc(struct stdio_dev *sdev)
{
return _serial_getc(sdev->priv);
}
-int serial_stub_tstc(struct stdio_dev *sdev)
+static int serial_stub_tstc(struct stdio_dev *sdev)
{
return _serial_tstc(sdev->priv);
}
+#endif
/**
* on_baudrate() - Update the actual baudrate when the env var changes
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index f2bd0e404c73..87542f92dfd9 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -273,14 +273,14 @@ static void serial_stub_puts(struct stdio_dev *sdev, const char *str)
dev->puts(str);
}
-int serial_stub_getc(struct stdio_dev *sdev)
+static int serial_stub_getc(struct stdio_dev *sdev)
{
struct serial_device *dev = sdev->priv;
return dev->getc();
}
-int serial_stub_tstc(struct stdio_dev *sdev)
+static int serial_stub_tstc(struct stdio_dev *sdev)
{
struct serial_device *dev = sdev->priv;
diff --git a/include/common.h b/include/common.h
index 638c45b954d2..1a98512ab618 100644
--- a/include/common.h
+++ b/include/common.h
@@ -490,11 +490,6 @@ void serial_puts (const char *);
int serial_getc (void);
int serial_tstc (void);
-/* These versions take a stdio_dev pointer */
-struct stdio_dev;
-int serial_stub_getc(struct stdio_dev *sdev);
-int serial_stub_tstc(struct stdio_dev *sdev);
-
/* $(CPU)/speed.c */
int get_clocks (void);
ulong get_bus_freq (ulong);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] serial: make serial_stub_* to static functions
2017-06-22 7:48 [U-Boot] [PATCH] serial: make serial_stub_* to static functions Masahiro Yamada
@ 2017-06-22 8:18 ` Bin Meng
2017-07-06 4:49 ` Simon Glass
2017-07-07 11:40 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Bin Meng @ 2017-06-22 8:18 UTC (permalink / raw)
To: u-boot
On Thu, Jun 22, 2017 at 3:48 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Add missing static to serial_stub_puts().
>
> Unexport serial_stub_{getc,tstc} because they are used locally.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> drivers/serial/serial-uclass.c | 11 +++++++----
> drivers/serial/serial.c | 4 ++--
> include/common.h | 5 -----
> 3 files changed, 9 insertions(+), 11 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] serial: make serial_stub_* to static functions
2017-06-22 7:48 [U-Boot] [PATCH] serial: make serial_stub_* to static functions Masahiro Yamada
2017-06-22 8:18 ` Bin Meng
@ 2017-07-06 4:49 ` Simon Glass
2017-07-07 11:40 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2017-07-06 4:49 UTC (permalink / raw)
To: u-boot
On 22 June 2017 at 01:48, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Add missing static to serial_stub_puts().
>
> Unexport serial_stub_{getc,tstc} because they are used locally.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> drivers/serial/serial-uclass.c | 11 +++++++----
> drivers/serial/serial.c | 4 ++--
> include/common.h | 5 -----
> 3 files changed, 9 insertions(+), 11 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] serial: make serial_stub_* to static functions
2017-06-22 7:48 [U-Boot] [PATCH] serial: make serial_stub_* to static functions Masahiro Yamada
2017-06-22 8:18 ` Bin Meng
2017-07-06 4:49 ` Simon Glass
@ 2017-07-07 11:40 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-07-07 11:40 UTC (permalink / raw)
To: u-boot
On Thu, Jun 22, 2017 at 04:48:49PM +0900, Masahiro Yamada wrote:
> Add missing static to serial_stub_puts().
>
> Unexport serial_stub_{getc,tstc} because they are used locally.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170707/13d84999/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-07 11:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-22 7:48 [U-Boot] [PATCH] serial: make serial_stub_* to static functions Masahiro Yamada
2017-06-22 8:18 ` Bin Meng
2017-07-06 4:49 ` Simon Glass
2017-07-07 11:40 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.