From: Michael Ellerman <michael@ellerman.id.au>
To: <linuxppc-dev@ozlabs.org>
Cc: Paul Mackerras <paulus@samba.org>, Anton Blanchard <anton@samba.org>
Subject: [PATCH 02/20] powerpc/xmon: Remove unused xmon_expect() & xmon_read_poll()
Date: Wed, 10 Oct 2012 01:20:29 +1100 [thread overview]
Message-ID: <1349792447-15714-2-git-send-email-michael@ellerman.id.au> (raw)
In-Reply-To: <1349792447-15714-1-git-send-email-michael@ellerman.id.au>
It looks like xmon_expect() was used for doing xmon over a modem (!?),
that code was dropped in 2005 in commit 51d3082 "Unify udbg (#2)".
Once xmon_expect() is gone xmon_read_poll() is unused, drop it too.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/xmon/nonstdio.c | 27 ---------------------------
arch/powerpc/xmon/nonstdio.h | 2 --
arch/powerpc/xmon/start.c | 7 -------
3 files changed, 36 deletions(-)
diff --git a/arch/powerpc/xmon/nonstdio.c b/arch/powerpc/xmon/nonstdio.c
index bfac84f..a225d80 100644
--- a/arch/powerpc/xmon/nonstdio.c
+++ b/arch/powerpc/xmon/nonstdio.c
@@ -23,33 +23,6 @@ static char line[256];
static char *lineptr;
static int lineleft;
-int xmon_expect(const char *str, unsigned long timeout)
-{
- int c;
- unsigned long t0;
-
- /* assume 25MHz default timebase if tb_ticks_per_sec not set yet */
- timeout *= tb_ticks_per_sec? tb_ticks_per_sec: 25000000;
- t0 = get_tbl();
- do {
- lineptr = line;
- for (;;) {
- c = xmon_read_poll();
- if (c == -1) {
- if (get_tbl() - t0 > timeout)
- return 0;
- continue;
- }
- if (c == '\n')
- break;
- if (c != '\r' && lineptr < &line[sizeof(line) - 1])
- *lineptr++ = c;
- }
- *lineptr = 0;
- } while (strstr(line, str) == NULL);
- return 1;
-}
-
int xmon_getchar(void)
{
int c;
diff --git a/arch/powerpc/xmon/nonstdio.h b/arch/powerpc/xmon/nonstdio.h
index 23dd95f..d8cec38 100644
--- a/arch/powerpc/xmon/nonstdio.h
+++ b/arch/powerpc/xmon/nonstdio.h
@@ -9,7 +9,5 @@ extern void xmon_puts(const char *);
extern char *xmon_gets(char *, int);
extern void xmon_printf(const char *, ...);
extern void xmon_map_scc(void);
-extern int xmon_expect(const char *str, unsigned long timeout);
extern int xmon_write(const void *ptr, int nb);
extern int xmon_readchar(void);
-extern int xmon_read_poll(void);
diff --git a/arch/powerpc/xmon/start.c b/arch/powerpc/xmon/start.c
index 8864de2..84f3a15 100644
--- a/arch/powerpc/xmon/start.c
+++ b/arch/powerpc/xmon/start.c
@@ -25,10 +25,3 @@ int xmon_readchar(void)
return udbg_getc();
return -1;
}
-
-int xmon_read_poll(void)
-{
- if (udbg_getc_poll)
- return udbg_getc_poll();
- return -1;
-}
--
1.7.9.5
next prev parent reply other threads:[~2012-10-09 14:20 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 14:20 [PATCH 01/20] powerpc/udbg: Remove unused udbg_read() Michael Ellerman
2012-10-09 14:20 ` Michael Ellerman [this message]
2012-10-09 14:20 ` [PATCH 03/20] powerpc/xmon: Remove empty xmon_map_scc() Michael Ellerman
2012-10-09 14:20 ` [PATCH 04/20] powerpc/xmon: Make xmon_getchar() static Michael Ellerman
2012-10-09 14:20 ` [PATCH 05/20] powerpc/xmon: Merge start.c into nonstdio.c Michael Ellerman
2012-10-09 14:20 ` [PATCH 06/20] powerpc/xmon: Remove renaming #defines of scanhex() and skipbl() Michael Ellerman
2012-10-09 14:59 ` David Laight
2012-10-09 22:15 ` Paul Mackerras
2012-10-10 1:00 ` Michael Ellerman
2012-10-09 14:20 ` [PATCH 07/20] powerpc/xmon: Remove unused #defines Michael Ellerman
2012-10-09 14:20 ` [PATCH 08/20] powerpc/xmon: Use STACK_FRAME_OVERHEAD in xmon_show_stack() Michael Ellerman
2012-10-09 14:20 ` [PATCH 09/20] powerpc/xmon: Fiddle xmon_depth_to_print logic " Michael Ellerman
2012-10-09 14:20 ` [PATCH 10/20] powerpc/xmon: Factor out the oft-repeated setjmp logic Michael Ellerman
2012-10-09 22:23 ` Paul Mackerras
2012-10-10 0:59 ` Michael Ellerman
2012-10-09 14:20 ` [PATCH 11/20] powerpc/xmon: Move handle_fault() next to related routines Michael Ellerman
2012-10-09 14:20 ` [PATCH 12/20] powerpc/xmon: Do so simple conversions to start/end_bus_error_jump() Michael Ellerman
2012-10-09 14:20 ` [PATCH 13/20] powerpc/xmon: Use start/end_bus_error_jump() in more routines Michael Ellerman
2012-10-09 14:20 ` [PATCH 14/20] powerpc/xmon: Convert read/write_spr() to use start_bus_error_jump() Michael Ellerman
2012-10-09 14:20 ` [PATCH 15/20] powerpc/xmon: Deindent stop/restart_spus() Michael Ellerman
2012-10-09 14:20 ` [PATCH 16/20] powerpc/xmon: Use start_bus_error_jump() in spu routines Michael Ellerman
2012-10-09 14:20 ` [PATCH 17/20] powerpc/xmon: Make less variables global Michael Ellerman
2012-10-09 14:20 ` [PATCH 18/20] powerpc/xmon: Use kallsyms_lookup_size_offset() in get_function_bounds() Michael Ellerman
2012-10-09 14:20 ` [PATCH 19/20] powerpc/xmon: Remove externs for non-existant routines Michael Ellerman
2012-10-09 14:20 ` [PATCH 20/20] powerpc/xmon: Fallback to printk() in xmon_printf() if udbg is not setup Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349792447-15714-2-git-send-email-michael@ellerman.id.au \
--to=michael@ellerman.id.au \
--cc=anton@samba.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).