From: "André Draszik" <andre.draszik@linaro.org>
To: Jiri Slaby <jirislaby@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Peter Griffin <peter.griffin@linaro.org>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Will McVicker <willmcvicker@google.com>,
kernel-team@android.com, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org
Subject: Re: [PATCH v2 2/2] tty: serial: samsung_tty: cast the interrupt's void *id just once
Date: Thu, 08 Aug 2024 09:11:45 +0100 [thread overview]
Message-ID: <a8a532a86732393e20f9cce2c9c1145f379477cd.camel@linaro.org> (raw)
In-Reply-To: <65ce2214-dad5-4a73-8806-07aab5404cf8@kernel.org>
On Thu, 2024-08-08 at 09:31 +0200, Jiri Slaby wrote:
> On 07. 08. 24, 13:58, André Draszik wrote:
> > The interrupt handler routines and helpers are casting the 'void *'
> > pointer to 'struct exynos_uart_port *' all over the place.
> >
> > There is no need for that, we can do the casting once and keep passing
> > the 'struct exynos_uart_port *', simplifying the code and saving a few
> > lines of code.
> >
> > No functional changes.
> ...
> > @@ -944,17 +939,17 @@ static irqreturn_t s3c24xx_serial_tx_irq(void *id)
> > /* interrupt handler for s3c64xx and later SoC's.*/
> > static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id)
> > {
> > - const struct s3c24xx_uart_port *ourport = id;
> > - const struct uart_port *port = &ourport->port;
> > + struct s3c24xx_uart_port *ourport = id;
> > + struct uart_port *port = &ourport->port;
> > u32 pend = rd_regl(port, S3C64XX_UINTP);
> > irqreturn_t ret = IRQ_HANDLED;
> >
> > if (pend & S3C64XX_UINTM_RXD_MSK) {
> > - ret = s3c24xx_serial_rx_irq(id);
> > + ret = s3c24xx_serial_rx_irq(ourport);
> > wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_RXD_MSK);
> > }
> > if (pend & S3C64XX_UINTM_TXD_MSK) {
> > - ret = s3c24xx_serial_tx_irq(id);
> > + ret = s3c24xx_serial_tx_irq(ourport);
> > wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_TXD_MSK);
> > }
> > return ret;
> > @@ -963,19 +958,19 @@ static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id)
> > /* interrupt handler for Apple SoC's.*/
> > static irqreturn_t apple_serial_handle_irq(int irq, void *id)
> > {
> > - const struct s3c24xx_uart_port *ourport = id;
> > - const struct uart_port *port = &ourport->port;
> > + struct s3c24xx_uart_port *ourport = id;
> > + struct uart_port *port = &ourport->port;
>
> No need to remove const from port here and above, right? (Only from
> ourport.)
Jiri, you're right of course.
Thanks,
A.
prev parent reply other threads:[~2024-08-08 8:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 11:58 [PATCH v2 0/2] tty: serial: samsung_tty: simple cleanups André Draszik
2024-08-07 11:58 ` [PATCH v2 1/2] tty: serial: samsung_tty: drop unused argument to irq handlers André Draszik
2024-08-07 11:58 ` [PATCH v2 2/2] tty: serial: samsung_tty: cast the interrupt's void *id just once André Draszik
2024-08-08 7:31 ` Jiri Slaby
2024-08-08 8:11 ` André Draszik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a8a532a86732393e20f9cce2c9c1145f379477cd.camel@linaro.org \
--to=andre.draszik@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kernel-team@android.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®