From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56690 invoked by alias); 12 Jan 2017 08:32:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 56665 invoked by uid 89); 12 Jan 2017 08:32:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:AES128-SHA, =e5=b0=a7, Hx-languages-length:1693, HX-Received:Thu?= X-HELO: mail-wm0-f65.google.com Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jan 2017 08:32:42 +0000 Received: by mail-wm0-f65.google.com with SMTP id l2so2065625wml.2 for ; Thu, 12 Jan 2017 00:32:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=O4jZ/reqZdIMrmcBcwiakFNc3w/Qq3zXyszq3/VDYso=; b=eCuW+aCjhVwyp7RIvyXYB6b2nGBV5aKrbIrygTAvRod2MBNRIkZqC5Obbz9uBQNXs2 DtfjqGo6cA5PKnw6bkzYOiT7h3g5h2m7jE8FnjJTjbcZF4zIgGFHB0nI8FV45NeXrG45 bnNez6pGyuMZq/rFyRurbHtl40QaUWjrbK2v/yhhVE50iMhJZykr0ebcON0rR1M5ADEM 0bzorsCmIyhh9CsNEMfLfUrYwvk5icxIQ1E7ruRZ0sGg2YVsgcmbbSq9BDtbQhv291Tz 2SE3YI4lK5zna2qTKlXYRoCBUopbk4QkNeP4xIszteMxqRiVbgBSvIhtsSngInoSF+4v /VbA== X-Gm-Message-State: AIkVDXL7nuRAewpaeroV7Jlhp8wfvTM45RTR6+GHX30v1d+3lSY6nHKgv3oNRwwC0l/9Bg== X-Received: by 10.28.139.131 with SMTP id n125mr5491078wmd.116.1484209959752; Thu, 12 Jan 2017 00:32:39 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id lr10sm12309233wjb.6.2017.01.12.00.32.37 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 00:32:39 -0800 (PST) Date: Thu, 12 Jan 2017 08:32:00 -0000 From: Yao Qi To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Remove dead serial_interface_lookup calls Message-ID: <20170112083228.GM9518@E107787-LIN> References: <20170111155847.13244-1-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170111155847.13244-1-simon.marchi@ericsson.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00203.txt.bz2 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 (齐尧)