Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3783010pxv; Tue, 13 Jul 2021 03:42:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZhoHRnNGjcnW9oOmX4rzjBXyPI1o+ucJwEJ8DNnbcce/plJ1qOTkj7FReJLemByRe73sR X-Received: by 2002:a17:906:7111:: with SMTP id x17mr4777443ejj.294.1626172966064; Tue, 13 Jul 2021 03:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626172966; cv=none; d=google.com; s=arc-20160816; b=lQIKYrkXCn999eWtzDCaeI4DTabZcJrOHnZzuQzQgyxZWuxAoiQd+QZM6j1Wui21y/ L18SRCd3mgW6B+BdipqXKvJKR4JB6pDjRIrUK9kByI4w5XJKeWw5zlyunfm4xutpjNk1 ibL+f1F/Msg9iXM6SrcFE8MVW/4w/qonrPntVv9vsMdbVw1uVqXBQq41vbM7jrmRdPBC 492NZfgOm1MAnK9nY89eplf3Ac7ASnAPxroZG5ArGkvCcg2kDEwxBwE2Af8MpX1Se6ha FqslMVone9ntPAaAE5Wuwx9uz1jOY++84uZGP8jP5gk/dkkZ9S+c9H/HWF8PQE4UmgOC EMAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4bQ3uragOKVSWKM9AmDbDCTm7pOM0Y8enIJ+k3TNZ18=; b=sF+uWtnMq0PZmic7qCscghon88KRUlMoBKaNgmhh3tG64rttHLKjN2tX01l4HnF0qd hCXlW4/X7Ku2xGQiiAMZqVy/r0yUFuWVQOR6kdXu6INneCsUq3egkoCCuc5s0xVEUnpo lmsXSdSU8/E7qkCK1TNLX+Sm9fcD6OBnMfR5ZpyKPW28CFUB9S29AlbBYfuoaTbOXBqe V49imx202fR9pkEkNYLp2vtl4q6tiSjo2UdvjWeSThk+RgZackzGYG9oJh4ow8FZvvmB e+m8xiXOHTlpTYPcIUI7WQUZZIZ5voQGuRi8WGfNG8gJxYPHCZb8LG0MnzhFjyiHgveY EwCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z11si6792118edb.95.2021.07.13.03.42.23; Tue, 13 Jul 2021 03:42:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235745AbhGMKnM (ORCPT + 99 others); Tue, 13 Jul 2021 06:43:12 -0400 Received: from mga11.intel.com ([192.55.52.93]:49793 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235733AbhGMKnM (ORCPT ); Tue, 13 Jul 2021 06:43:12 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10043"; a="207122151" X-IronPort-AV: E=Sophos;i="5.84,236,1620716400"; d="scan'208";a="207122151" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2021 03:40:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,236,1620716400"; d="scan'208";a="451723458" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 13 Jul 2021 03:40:05 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8B4FEB9; Tue, 13 Jul 2021 13:40:32 +0300 (EEST) From: Andy Shevchenko To: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko Subject: [PATCH v1 2/4] serial: 8250_pci: Get rid of redundant 'else' keyword Date: Tue, 13 Jul 2021 13:40:24 +0300 Message-Id: <20210713104026.58560-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210713104026.58560-1-andriy.shevchenko@linux.intel.com> References: <20210713104026.58560-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'else' keyword is not needed when previous conditional branch returns to the upper layer. Get rid of redundant 'else' keyword in such cases. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_pci.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index b9138bd08b7f..937861327aca 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -515,7 +515,7 @@ static int pci_siig_init(struct pci_dev *dev) if (type == 0x1000) return pci_siig10x_init(dev); - else if (type == 0x2000) + if (type == 0x2000) return pci_siig20x_init(dev); moan_device("Unknown SIIG card", dev); @@ -792,9 +792,9 @@ static int pci_netmos_9900_setup(struct serial_private *priv, bar = 3 * idx; return setup_port(priv, port, bar, 0, board->reg_shift); - } else { - return pci_default_setup(priv, board, port, idx); } + + return pci_default_setup(priv, board, port, idx); } /* the 99xx series comes with a range of device IDs and a variety @@ -1361,9 +1361,10 @@ pericom_do_set_divisor(struct uart_port *port, unsigned int baud, serial_port_out(port, 2, 16 - scr); serial_port_out(port, UART_LCR, lcr); return; - } else if (baud > actual_baud) { - break; } + + if (baud > actual_baud) + break; } serial8250_do_set_divisor(port, baud, quot, quot_frac); } -- 2.30.2