diff mbox

[U-Boot,2/2] serial: Remove serial_putc_raw_dev

Message ID 1453292585-27710-2-git-send-email-trini@konsulko.com
State Accepted
Commit 0080931abfec5c25f76683e5b96b483416bd14f2
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Jan. 20, 2016, 12:23 p.m. UTC
clang-3.8 reports that serial_putc_raw_dev in serial_ns16550.c is
unused.  Further investigation shows that we have 3 places that
implement this function and no callers, remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/powerpc/cpu/mpc512x/serial.c |   12 ------------
 arch/powerpc/cpu/mpc5xxx/serial.c |   11 -----------
 drivers/serial/serial_ns16550.c   |   11 -----------
 3 files changed, 34 deletions(-)

Comments

Bin Meng Jan. 21, 2016, 3:35 a.m. UTC | #1
On Wed, Jan 20, 2016 at 8:23 PM, Tom Rini <trini@konsulko.com> wrote:
> clang-3.8 reports that serial_putc_raw_dev in serial_ns16550.c is
> unused.  Further investigation shows that we have 3 places that
> implement this function and no callers, remove.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  arch/powerpc/cpu/mpc512x/serial.c |   12 ------------
>  arch/powerpc/cpu/mpc5xxx/serial.c |   11 -----------
>  drivers/serial/serial_ns16550.c   |   11 -----------
>  3 files changed, 34 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini Jan. 25, 2016, 9:28 p.m. UTC | #2
On Wed, Jan 20, 2016 at 07:23:05AM -0500, Tom Rini wrote:

> clang-3.8 reports that serial_putc_raw_dev in serial_ns16550.c is
> unused.  Further investigation shows that we have 3 places that
> implement this function and no callers, remove.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

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

Patch

diff --git a/arch/powerpc/cpu/mpc512x/serial.c b/arch/powerpc/cpu/mpc512x/serial.c
index 4105a28..ac77ddc 100644
--- a/arch/powerpc/cpu/mpc512x/serial.c
+++ b/arch/powerpc/cpu/mpc512x/serial.c
@@ -203,18 +203,6 @@  void serial_putc_dev(unsigned int idx, const char c)
 	out_8(&psc->tfdata_8, c);
 }
 
-void serial_putc_raw_dev(unsigned int idx, const char c)
-{
-	volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-	volatile psc512x_t *psc = (psc512x_t *) &im->psc[idx];
-
-	/* Wait for last character to go. */
-	while (!(in_be16(&psc->psc_status) & PSC_SR_TXEMP))
-		;
-
-	out_8(&psc->tfdata_8, c);
-}
-
 void serial_puts_dev(unsigned int idx, const char *s)
 {
 	while (*s)
diff --git a/arch/powerpc/cpu/mpc5xxx/serial.c b/arch/powerpc/cpu/mpc5xxx/serial.c
index cb5b0bf..bccdcf7 100644
--- a/arch/powerpc/cpu/mpc5xxx/serial.c
+++ b/arch/powerpc/cpu/mpc5xxx/serial.c
@@ -112,17 +112,6 @@  void serial_putc_dev (unsigned long dev_base, const char c)
 	psc->psc_buffer_8 = c;
 }
 
-void serial_putc_raw_dev(unsigned long dev_base, const char c)
-{
-	volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
-	/* Wait for last character to go. */
-	while (!(psc->psc_status & PSC_SR_TXEMP))
-		;
-
-	psc->psc_buffer_8 = c;
-}
-
-
 void serial_puts_dev (unsigned long dev_base, const char *s)
 {
 	while (*s) {
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 799ef6a..fcb1e95 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -127,11 +127,6 @@  static void _serial_putc(const char c, const int port)
 	NS16550_putc(PORT, c);
 }
 
-static void _serial_putc_raw(const char c, const int port)
-{
-	NS16550_putc(PORT, c);
-}
-
 static void _serial_puts(const char *s, const int port)
 {
 	while (*s) {
@@ -165,12 +160,6 @@  serial_putc_dev(unsigned int dev_index,const char c)
 }
 
 static inline void
-serial_putc_raw_dev(unsigned int dev_index,const char c)
-{
-	_serial_putc_raw(c,dev_index);
-}
-
-static inline void
 serial_puts_dev(unsigned int dev_index,const char *s)
 {
 	_serial_puts(s,dev_index);