diff mbox

[U-Boot,v2] common/console.c: Remove unused inline functions

Message ID 1453385426-20908-1-git-send-email-trini@konsulko.com
State Accepted
Commit 3da52409250a48423a9297a7afbf1f09d0a855fe
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Jan. 21, 2016, 2:10 p.m. UTC
clang-3.8 reports that these functions are unused, remove them.  As this
is the last part of CONFIG_MODEM_SUPPORT_DEBUG, drop that from README.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

---
Changes in v2:
- Drop CONFIG_MODEM_SUPPORT_DEBUG from README as per Bin
---
 README           |    6 ------
 common/console.c |   48 ------------------------------------------------
 2 files changed, 54 deletions(-)

Comments

Tom Rini Jan. 25, 2016, 9:29 p.m. UTC | #1
On Thu, Jan 21, 2016 at 09:10:26AM -0500, Tom Rini wrote:

> clang-3.8 reports that these functions are unused, remove them.  As this
> is the last part of CONFIG_MODEM_SUPPORT_DEBUG, drop that from README.
> 
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>

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

Patch

diff --git a/README b/README
index ece4793..864c7cc 100644
--- a/README
+++ b/README
@@ -3712,12 +3712,6 @@  Modem Support:
 - RTS/CTS Flow control enable:
 		CONFIG_HWFLOW
 
-- Modem debug support:
-		CONFIG_MODEM_SUPPORT_DEBUG
-
-		Enables debugging stuff (char screen[1024], dbg())
-		for modem support. Useful only with BDI2000.
-
 - Interrupt support (PPC):
 
 		There are common interrupt_init() and timer_interrupt()
diff --git a/common/console.c b/common/console.c
index bc37b6d..b3f5fdc 100644
--- a/common/console.c
+++ b/common/console.c
@@ -227,11 +227,6 @@  static void console_puts(int file, const char *s)
 	}
 }
 
-static inline void console_printdevs(int file)
-{
-	iomux_printdevs(file);
-}
-
 static inline void console_doenv(int file, struct stdio_dev *dev)
 {
 	iomux_doenv(file, dev->name);
@@ -265,11 +260,6 @@  static inline void console_puts(int file, const char *s)
 	stdio_devices[file]->puts(stdio_devices[file], s);
 }
 
-static inline void console_printdevs(int file)
-{
-	printf("%s\n", stdio_devices[file]->name);
-}
-
 static inline void console_doenv(int file, struct stdio_dev *dev)
 {
 	console_setfile(file, dev);
@@ -653,44 +643,6 @@  void clear_ctrlc(void)
 	ctrlc_was_pressed = 0;
 }
 
-#ifdef CONFIG_MODEM_SUPPORT_DEBUG
-char	screen[1024];
-char *cursor = screen;
-int once = 0;
-inline void dbg(const char *fmt, ...)
-{
-	va_list	args;
-	uint	i;
-	char	printbuffer[CONFIG_SYS_PBSIZE];
-
-	if (!once) {
-		memset(screen, 0, sizeof(screen));
-		once++;
-	}
-
-	va_start(args, fmt);
-
-	/* For this to work, printbuffer must be larger than
-	 * anything we ever want to print.
-	 */
-	i = vsnprintf(printbuffer, sizeof(printbuffer), fmt, args);
-	va_end(args);
-
-	if ((screen + sizeof(screen) - 1 - cursor)
-	    < strlen(printbuffer) + 1) {
-		memset(screen, 0, sizeof(screen));
-		cursor = screen;
-	}
-	sprintf(cursor, printbuffer);
-	cursor += strlen(printbuffer);
-
-}
-#else
-static inline void dbg(const char *fmt, ...)
-{
-}
-#endif
-
 /** U-Boot INIT FUNCTIONS *************************************************/
 
 struct stdio_dev *search_device(int flags, const char *name)