[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VddLV3Ke8J3hYw0wLO_77H8K20J_g=QeLG8B0XYt90ZRA@mail.gmail.com>
Date: Tue, 27 Feb 2018 19:57:34 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Michael Moese <mmoese@...e.de>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
Johannes Thumshirn <jthumshirn@...e.de>,
Andreas Geissler <andreas.geissler@....de>,
Ben Turner <ben.turner@...et.com>
Subject: Re: [PATCH] 8250-men-mcb: add support for 16z025 and 16z057
On Tue, Feb 27, 2018 at 5:31 PM, Michael Moese <mmoese@...e.de> wrote:
> Add support for two MEN UARTs (16z025 and 16z057) to the
> 8250_men_mcb driver.
> The 16z025 consists of up to four ports, the 16z057 has
> exactly four ports. Apart from that, all of them share the
> Port settings.
> - else if (strncmp(mdev->bus->name, "F216", 4) == 0)
> + else if (strncmp(mdev->bus->name, "F216", 4) == 0)
What's changed?
> clkval = 1843200;
> + switch (mdev->id) {
> + case MEN_UART_ID_Z125:
> + num_ports = 1U;
> + break;
> + case MEN_UART_ID_Z025:
> + num_ports = readb(membase) >> 4;
> + break;
> + case MEN_UART_ID_Z057:
> + num_ports = 4U;
> + break;
> + default:
> + dev_err(&mdev->dev, "no supported device!\n");
> + return -ENODEV;
> + }
(1)
> + data[i].uart.port.mapbase = (unsigned long) mem->start
> + + (i * MEN_UART_MEM_SIZE);
Redundant parens.
> + switch (mdev->id) {
> + case MEN_UART_ID_Z125:
> + num_ports = 1U;
> + break;
> + case MEN_UART_ID_Z025:
> + num_ports = readb(data[0].uart.port.membase) >> 4;
> + break;
> + case MEN_UART_ID_Z057:
> + num_ports = 4U;
> + break;
> + default:
> + dev_err(&mdev->dev, "no supported device!\n");
> + return;
> + }
Can you deduplicate this with (1)?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists