[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ea8b7f1-292c-8710-e094-55ed409f0a37@kernel.org>
Date: Tue, 26 Oct 2021 07:21:01 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] serial: 8250_pci: Get rid of redundant 'else'
keyword
On 22. 10. 21, 15:51, Andy Shevchenko wrote:
> 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 <andriy.shevchenko@...ux.intel.com>
Reviewed-by: Jiri Slaby <jslaby@...nel.org>
> ---
> v2: avoided changes in Pericom code for now (it makes sense to split support
> to a separate driver)
> drivers/tty/serial/8250/8250_pci.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
> index 8a2f42507c18..463b2c71da6f 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
>
--
js
suse labs
Powered by blists - more mailing lists