* [PATCH] Remove dead serial_interface_lookup calls
@ 2017-01-11 15:59 Simon Marchi
2017-01-12 8:32 ` Yao Qi
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2017-01-11 15:59 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
By inspecting the serial_add_interface calls, I found that the serial
interface names that we have today are:
- hardwire
- terminal
- pipe
- tcp
- event
The calls to serial_interface_lookup with any other names are most
likely leftovers which can be removed since these serial interfaces
don't exist anymore. If you go back to the commits that added the
lines this patch removes, you'll find the serial interface that existed
at that time.
gdb/ChangeLog:
* serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
---
gdb/serial.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/gdb/serial.c b/gdb/serial.c
index ac7c1b99c1..afb70758c6 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -209,11 +209,7 @@ serial_open (const char *name)
const struct serial_ops *ops;
const char *open_name = name;
- if (strcmp (name, "pc") == 0)
- ops = serial_interface_lookup ("pc");
- else if (startswith (name, "lpt"))
- ops = serial_interface_lookup ("parallel");
- else if (startswith (name, "|"))
+ if (startswith (name, "|"))
{
ops = serial_interface_lookup ("pipe");
/* Discard ``|'' and any space before the command itself. */
--
2.11.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove dead serial_interface_lookup calls
2017-01-11 15:59 [PATCH] Remove dead serial_interface_lookup calls Simon Marchi
@ 2017-01-12 8:32 ` Yao Qi
2017-01-12 15:42 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2017-01-12 8:32 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
On 17-01-11 10:58:47, Simon Marchi wrote:
> By inspecting the serial_add_interface calls, I found that the serial
> interface names that we have today are:
>
> - hardwire
> - terminal
> - pipe
> - tcp
> - event
>
> The calls to serial_interface_lookup with any other names are most
> likely leftovers which can be removed since these serial interfaces
> don't exist anymore. If you go back to the commits that added the
> lines this patch removes, you'll find the serial interface that existed
> at that time.
It would be nice to show the commits remove these serial interfaces.
>
> gdb/ChangeLog:
>
> * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
Patch is good to me.
> ---
> gdb/serial.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/gdb/serial.c b/gdb/serial.c
> index ac7c1b99c1..afb70758c6 100644
> --- a/gdb/serial.c
> +++ b/gdb/serial.c
> @@ -209,11 +209,7 @@ serial_open (const char *name)
> const struct serial_ops *ops;
> const char *open_name = name;
>
> - if (strcmp (name, "pc") == 0)
> - ops = serial_interface_lookup ("pc");
It was removed by cb2a4ac5dae478fcd9d6e772530c3aba0576fc7a
-static struct serial_ops e7000pc_ops =
-{
- "pc",
- 0,
- e7000pc_open,
- e7000pc_close,
- e7000pc_readchar,
- e7000pc_write,
- e7000pc_noop, /* flush output */
> - else if (startswith (name, "lpt"))
> - ops = serial_interface_lookup ("parallel");
It was removed by e386d4d2fb55042f77d0557a0849ed2464aee7b3
-static struct serial_ops go32_ops =
-{
- "parallel",
- 0,
- go32_open,
- go32_close,
- go32_readchar,
- go32_write,
- go32_noop, /* flush output */
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove dead serial_interface_lookup calls
2017-01-12 8:32 ` Yao Qi
@ 2017-01-12 15:42 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2017-01-12 15:42 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 17-01-12 03:32 AM, Yao Qi wrote:
> On 17-01-11 10:58:47, Simon Marchi wrote:
>> By inspecting the serial_add_interface calls, I found that the serial
>> interface names that we have today are:
>>
>> - hardwire
>> - terminal
>> - pipe
>> - tcp
>> - event
>>
>> The calls to serial_interface_lookup with any other names are most
>> likely leftovers which can be removed since these serial interfaces
>> don't exist anymore. If you go back to the commits that added the
>> lines this patch removes, you'll find the serial interface that existed
>> at that time.
>
> It would be nice to show the commits remove these serial interfaces.
Right, thanks for digging those out.
>>
>> gdb/ChangeLog:
>>
>> * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
>
> Patch is good to me.
>
>> ---
>> gdb/serial.c | 6 +-----
>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/gdb/serial.c b/gdb/serial.c
>> index ac7c1b99c1..afb70758c6 100644
>> --- a/gdb/serial.c
>> +++ b/gdb/serial.c
>> @@ -209,11 +209,7 @@ serial_open (const char *name)
>> const struct serial_ops *ops;
>> const char *open_name = name;
>>
>> - if (strcmp (name, "pc") == 0)
>> - ops = serial_interface_lookup ("pc");
>
> It was removed by cb2a4ac5dae478fcd9d6e772530c3aba0576fc7a
>
> -static struct serial_ops e7000pc_ops =
> -{
> - "pc",
> - 0,
> - e7000pc_open,
> - e7000pc_close,
> - e7000pc_readchar,
> - e7000pc_write,
> - e7000pc_noop, /* flush output */
>
>> - else if (startswith (name, "lpt"))
>> - ops = serial_interface_lookup ("parallel");
>
> It was removed by e386d4d2fb55042f77d0557a0849ed2464aee7b3
>
> -static struct serial_ops go32_ops =
> -{
> - "parallel",
> - 0,
> - go32_open,
> - go32_close,
> - go32_readchar,
> - go32_write,
> - go32_noop, /* flush output */
>
Thanks, I updated the commit message with references to those commits and pushed it:
From 0e88921b1628d0c54b1bcba7abb2c354d39664db Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@ericsson.com>
Date: Thu, 12 Jan 2017 10:39:35 -0500
Subject: [PATCH] Remove dead serial_interface_lookup calls
By inspecting the serial_add_interface calls, I found that the serial
interface names that we have today are:
- hardwire
- terminal
- pipe
- tcp
- event
The calls to serial_interface_lookup with any other names are most
likely leftovers which can be removed since these serial interfaces
don't exist anymore. The commits that removed the "pc" and "parallel"
interfaces are respectively:
cb2a4ac5dae478fcd9d6e772530c3aba0576fc7a
and
e386d4d2fb55042f77d0557a0849ed2464aee7b3
gdb/ChangeLog:
* serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
---
gdb/ChangeLog | 4 ++++
gdb/serial.c | 6 +-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 89bbb8fbaf..153f6cd7df 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
+
+ * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
+
2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
* cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
diff --git a/gdb/serial.c b/gdb/serial.c
index ac7c1b99c1..afb70758c6 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -209,11 +209,7 @@ serial_open (const char *name)
const struct serial_ops *ops;
const char *open_name = name;
- if (strcmp (name, "pc") == 0)
- ops = serial_interface_lookup ("pc");
- else if (startswith (name, "lpt"))
- ops = serial_interface_lookup ("parallel");
- else if (startswith (name, "|"))
+ if (startswith (name, "|"))
{
ops = serial_interface_lookup ("pipe");
/* Discard ``|'' and any space before the command itself. */
--
2.11.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-12 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 15:59 [PATCH] Remove dead serial_interface_lookup calls Simon Marchi
2017-01-12 8:32 ` Yao Qi
2017-01-12 15:42 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox