Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752896AbdFPLoF (ORCPT ); Fri, 16 Jun 2017 07:44:05 -0400 Received: from mga07.intel.com ([134.134.136.100]:17933 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375AbdFPLoC (ORCPT ); Fri, 16 Jun 2017 07:44:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,347,1493708400"; d="scan'208";a="1161266789" Message-ID: <1497613434.22624.145.camel@linux.intel.com> Subject: Re: [PATCH] serial: Delete dead code for CIR serial ports From: Andy Shevchenko To: Matthias Brugger , gregkh@linuxfoundation.org, jslaby@suse.com Cc: ed.blake@imgtec.com, vigneshr@ti.com, alexander.sverdlin@nokia.com, yegorslists@googlemail.com, dhowells@redhat.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 16 Jun 2017 14:43:54 +0300 In-Reply-To: <20170615155449.28482-1-mbrugger@suse.com> References: <20170615155449.28482-1-mbrugger@suse.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 656 Lines: 28 On Thu, 2017-06-15 at 17:54 +0200, Matthias Brugger wrote: > Commit e4fda3a04275 ("serial: don't register CIR serial ports") adds a > check for PORT_8250_CIR to serial8250_register_8250_port(). But the > code > isn't needed as the function never takes the branch when the port is > CIR > serial port. > + if (serial8250_isa_config != NULL) > + serial8250_isa_config(0, &uart->port, > + &uart->capabilities); Can't it be one line after all? >   > + ret = uart_add_one_port(&serial8250_reg, > + &uart->port); Ditto. > + if (ret == 0) > + ret = uart->port.line; -- Andy Shevchenko Intel Finland Oy