Skip to content

Commit

Permalink
powerpc/udbg: Remove unused udbg_read()
Browse files Browse the repository at this point in the history
The last user of udbg_read() was removed in 2005, in commit fca5dcd
"Simplify and clean up the xmon terminal I/O".

Given we haven't needed it for 7 years we can probably drop it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed Nov 15, 2012
1 parent f7fb862 commit 6432200
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/udbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ extern int (*udbg_getc_poll)(void);

extern void udbg_puts(const char *s);
extern int udbg_write(const char *s, int n);
extern int udbg_read(char *buf, int buflen);

extern void register_early_udbg_console(void);
extern void udbg_printf(const char *fmt, ...)
Expand Down
23 changes: 0 additions & 23 deletions arch/powerpc/kernel/udbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,29 +122,6 @@ int udbg_write(const char *s, int n)
return n - remain;
}

int udbg_read(char *buf, int buflen)
{
char *p = buf;
int i, c;

if (!udbg_getc)
return 0;

for (i = 0; i < buflen; ++i) {
do {
c = udbg_getc();
if (c == -1 && i == 0)
return -1;

} while (c == 0x11 || c == 0x13);
if (c == 0 || c == -1)
break;
*p++ = c;
}

return i;
}

#define UDBG_BUFSIZE 256
void udbg_printf(const char *fmt, ...)
{
Expand Down

0 comments on commit 6432200

Please sign in to comment.