[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4475513e-ffe5-6064-d37e-8dbc16805dc7@marcan.st>
Date: Thu, 18 Feb 2021 22:24:55 +0900
From: Hector Martin <marcan@...can.st>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org,
Marc Zyngier <maz@...nel.org>, Rob Herring <robh@...nel.org>,
Arnd Bergmann <arnd@...nel.org>,
Olof Johansson <olof@...om.net>,
Mark Kettenis <mark.kettenis@...all.nl>,
Tony Lindgren <tony@...mide.com>,
Mohamed Mediouni <mohamed.mediouni@...amail.com>,
Stan Skowronek <stan@...ellium.com>,
Alexander Graf <graf@...zon.com>,
Will Deacon <will@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Mark Rutland <mark.rutland@....com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 17/25] tty: serial: samsung_tty: Separate S3C64XX ops
structure
On 16/02/2021 03.06, Krzysztof Kozlowski wrote:
> On Mon, Feb 15, 2021 at 09:17:05PM +0900, Hector Martin wrote:
>> +static void s3c64xx_serial_shutdown(struct uart_port *port)
>> +{
>> + struct s3c24xx_uart_port *ourport = to_ourport(port);
>> +
>> + free_irq(port->irq, ourport);
>> +
>> + wr_regl(port, S3C64XX_UINTP, 0xf);
>> + wr_regl(port, S3C64XX_UINTM, 0xf);
>> +
>> + ourport->tx_enabled = 0;
>> + ourport->tx_mode = 0;
>> + ourport->rx_enabled = 0;
>
> For S3C64xx type this is not equivalent: the assignments were
> happening before free_irq() and wr_regl(). Honestly I don't know whether
> it matters (except some barriers coming from these functions) but please
> do not change the order of code in this patch. If needed, the
> re-ordering should be a patch on its own. With explanation why.
Honestly, I think if anything the masking should happen first (to make
sure no IRQs go off), but at this point it's probably better to play it
safe and not introduce any logic changes, so I've moved the assignments
first to retain the old behavior.
> Make the s3c24xx_serial_ops const as well.
Done for v3, thanks.
--
Hector Martin (marcan@...can.st)
Public Key: https://mrcn.st/pub
Powered by blists - more mailing lists